openBottomSheet<T> method
Future<T?>
openBottomSheet<T>({
- required Widget bottomSheet,
- Color? backgroundColor,
- String? barrierLabel,
- double? elevation,
- ShapeBorder? shape,
- Clip? clipBehavior,
- BoxConstraints? constraints,
- Color? barrierColor,
- bool isScrollControlled = false,
- bool isDismissible = true,
- bool enableDrag = true,
- bool? showDragHandle,
- bool useSafeArea = false,
- RouteSettings? routeSettings,
- AnimationController? transitionAnimationController,
- Offset? anchorPoint,
override
Implementation
@override
Future<T?> openBottomSheet<T>({
required Widget bottomSheet,
Color? backgroundColor,
String? barrierLabel,
double? elevation,
ShapeBorder? shape,
Clip? clipBehavior,
BoxConstraints? constraints,
Color? barrierColor,
bool isScrollControlled = false,
bool useRootNavigator = false,
bool isDismissible = true,
bool enableDrag = true,
bool? showDragHandle,
bool useSafeArea = false,
RouteSettings? routeSettings,
AnimationController? transitionAnimationController,
Offset? anchorPoint,
}) async {
String runtimeType = bottomSheet.runtimeType.toString();
registerPopUp(runtimeType: runtimeType, key: bottomSheet.key, isDialog: false);
String bottomSheetNameAndKey = openedDialogOrBottomSheetList.last;
T? output = await showModalBottomSheet<T>(
context: context,
builder: (_) => bottomSheet,
backgroundColor: backgroundColor,
barrierLabel: barrierLabel,
elevation: elevation,
shape: shape,
clipBehavior: clipBehavior,
constraints: constraints,
barrierColor: barrierColor,
isScrollControlled: isScrollControlled,
useRootNavigator: useRootNavigator,
isDismissible: isDismissible,
enableDrag: enableDrag,
showDragHandle: showDragHandle,
useSafeArea: useSafeArea,
routeSettings: routeSettings ?? RouteSettings(name: bottomSheetNameAndKey),
transitionAnimationController: transitionAnimationController,
anchorPoint: anchorPoint,
);
removePopUpNameAndKey(nameAndKey: bottomSheetNameAndKey, isDialog: false);
return output;
}