Committed by
GitHub
Merge pull request #256 from seljmov/fix_bar_color
Fix BarBottomSheet background color
Showing
1 changed file
with
4 additions
and
0 deletions
@@ -12,6 +12,7 @@ class BarBottomSheet extends StatelessWidget { | @@ -12,6 +12,7 @@ class BarBottomSheet extends StatelessWidget { | ||
12 | final Widget child; | 12 | final Widget child; |
13 | final Widget? control; | 13 | final Widget? control; |
14 | final Clip? clipBehavior; | 14 | final Clip? clipBehavior; |
15 | + final Color? backgroundColor; | ||
15 | final double? elevation; | 16 | final double? elevation; |
16 | final ShapeBorder? shape; | 17 | final ShapeBorder? shape; |
17 | final SystemUiOverlayStyle? overlayStyle; | 18 | final SystemUiOverlayStyle? overlayStyle; |
@@ -22,6 +23,7 @@ class BarBottomSheet extends StatelessWidget { | @@ -22,6 +23,7 @@ class BarBottomSheet extends StatelessWidget { | ||
22 | this.control, | 23 | this.control, |
23 | this.clipBehavior, | 24 | this.clipBehavior, |
24 | this.shape, | 25 | this.shape, |
26 | + this.backgroundColor, | ||
25 | this.elevation, | 27 | this.elevation, |
26 | this.overlayStyle, | 28 | this.overlayStyle, |
27 | }) : super(key: key); | 29 | }) : super(key: key); |
@@ -59,6 +61,7 @@ class BarBottomSheet extends StatelessWidget { | @@ -59,6 +61,7 @@ class BarBottomSheet extends StatelessWidget { | ||
59 | topRight: _default_bar_top_radius), | 61 | topRight: _default_bar_top_radius), |
60 | ), | 62 | ), |
61 | clipBehavior: clipBehavior ?? Clip.hardEdge, | 63 | clipBehavior: clipBehavior ?? Clip.hardEdge, |
64 | + color: backgroundColor ?? Colors.white, | ||
62 | elevation: elevation ?? 2, | 65 | elevation: elevation ?? 2, |
63 | child: SizedBox( | 66 | child: SizedBox( |
64 | width: double.infinity, | 67 | width: double.infinity, |
@@ -105,6 +108,7 @@ Future<T?> showBarModalBottomSheet<T>({ | @@ -105,6 +108,7 @@ Future<T?> showBarModalBottomSheet<T>({ | ||
105 | control: topControl, | 108 | control: topControl, |
106 | clipBehavior: clipBehavior, | 109 | clipBehavior: clipBehavior, |
107 | shape: shape, | 110 | shape: shape, |
111 | + backgroundColor: backgroundColor, | ||
108 | elevation: elevation, | 112 | elevation: elevation, |
109 | overlayStyle: overlayStyle, | 113 | overlayStyle: overlayStyle, |
110 | ), | 114 | ), |
-
Please register or login to post a comment