openBottomSheet<T> method

  1. @override
Future<T?> openBottomSheet<T>({
  1. required Widget bottomSheet,
  2. Color? backgroundColor,
  3. String? barrierLabel,
  4. double? elevation,
  5. ShapeBorder? shape,
  6. Clip? clipBehavior,
  7. BoxConstraints? constraints,
  8. Color? barrierColor,
  9. bool isScrollControlled = false,
  10. bool useRootNavigator = false,
  11. bool isDismissible = true,
  12. bool enableDrag = true,
  13. bool? showDragHandle,
  14. bool useSafeArea = false,
  15. RouteSettings? routeSettings,
  16. AnimationController? transitionAnimationController,
  17. 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;
}