Keep compact bar insets inside the floating chat window
This commit is contained in:
@@ -44,6 +44,12 @@ class WindowMargins extends StatelessWidget {
|
||||
context.dependOnInheritedWidgetOfExactType<_WindowMarginsScope>()?.wide ??
|
||||
false;
|
||||
|
||||
/// Gives [child] the phone's margins inside a wide window: a small window
|
||||
/// of its own (a floating chat) whose bars sit close to its frame. It
|
||||
/// changes only the side inset; the window drops the top padding itself.
|
||||
static Widget compact({required Widget child}) =>
|
||||
_WindowMarginsScope(wide: false, child: child);
|
||||
|
||||
/// A top bar piece's distance from the sides at [context].
|
||||
static double sideOf(BuildContext context) =>
|
||||
wideOf(context) ? wideMargin : narrowSide;
|
||||
|
||||
Reference in New Issue
Block a user