Skip to content

Commit

Permalink
feat: add bottomsheet elevation property
Browse files Browse the repository at this point in the history
Allow users to adjust the elevation of bottom sheets when showing it.
  • Loading branch information
ZimvoMatwa authored Feb 8, 2024
1 parent 6b12187 commit 9d7eef6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/bottom_sheet/bottom_sheet_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class BottomSheetService {
Duration? enterBottomSheetDuration,
bool? ignoreSafeArea,
bool useRootNavigator = false,
double elevation = 1,
}) {
return Get.bottomSheet<SheetResponse?>(
Material(
Expand All @@ -51,6 +52,7 @@ class BottomSheetService {
backgroundColor: Theme.of(Get.context!).brightness == Brightness.light
? Colors.white
: Colors.grey[800],
elevation: elevation,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(15),
Expand Down Expand Up @@ -98,6 +100,7 @@ class BottomSheetService {
String? additionalButtonTitle,
bool takesInput = false,
Color barrierColor = Colors.black54,
double elevation = 1,
bool barrierDismissible = true,
bool isScrollControlled = false,
String barrierLabel = '',
Expand Down Expand Up @@ -149,6 +152,7 @@ class BottomSheetService {
),
),
barrierColor: barrierColor,
elevation: elevation,
isDismissible: barrierDismissible,
isScrollControlled: isScrollControlled,
enableDrag: barrierDismissible && enableDrag,
Expand Down

0 comments on commit 9d7eef6

Please sign in to comment.