bottomSheet<T> method

Future<T?> bottomSheet<T>(
  1. Widget bottomsheet, {
  2. Color? backgroundColor,
  3. double? elevation,
  4. bool isPersistent = false,
  5. ShapeBorder? shape,
  6. Clip? clipBehavior,
  7. Color? barrierColor,
  8. bool? ignoreSafeArea,
  9. bool isScrollControlled = false,
  10. bool useRootNavigator = false,
  11. bool isDismissible = true,
  12. bool enableDrag = true,
  13. RouteSettings? settings,
  14. Duration? enterBottomSheetDuration,
  15. Duration? exitBottomSheetDuration,
  16. Curve? curve,
  17. BoxConstraints? contraints,
  18. bool? showDragHandle = true,
  19. Color? dragHandleColor,
  20. Size? dragHandleSize,
  21. BottomSheetDragEndHandler? onDragEnd,
  22. BottomSheetDragStartHandler? onDragStart,
  23. Color? shadowColor,
})

Implementation

Future<T?> bottomSheet<T>(
  Widget bottomsheet, {
  Color? backgroundColor,
  double? elevation,
  bool isPersistent = false,
  ShapeBorder? shape,
  Clip? clipBehavior,
  Color? barrierColor,
  bool? ignoreSafeArea,
  bool isScrollControlled = false,
  bool useRootNavigator = false,
  bool isDismissible = true,
  bool enableDrag = true,
  RouteSettings? settings,
  Duration? enterBottomSheetDuration,
  Duration? exitBottomSheetDuration,
  Curve? curve,
  BoxConstraints? contraints,
  bool? showDragHandle = true,
  Color? dragHandleColor,
  Size? dragHandleSize,
  BottomSheetDragEndHandler? onDragEnd,
  BottomSheetDragStartHandler? onDragStart,
  Color? shadowColor,
}) =>
    Navigator.of(overlayContext!, rootNavigator: useRootNavigator).push(
      GetModalBottomSheetRoute<T>(
        builder: (_) => bottomsheet,
        isPersistent: isPersistent,
        theme: Theme.of(key.currentContext!),
        isScrollControlled: isScrollControlled,
        barrierLabel: MaterialLocalizations.of(key.currentContext!)
            .modalBarrierDismissLabel,
        backgroundColor: backgroundColor,
        elevation: elevation,
        shape: shape,
        removeTop: ignoreSafeArea ?? true,
        clipBehavior: clipBehavior,
        isDismissible: isDismissible,
        modalBarrierColor: barrierColor,
        settings: settings,
        enableDrag: enableDrag,
        enterBottomSheetDuration:
            enterBottomSheetDuration ?? const Duration(milliseconds: 250),
        exitBottomSheetDuration:
            exitBottomSheetDuration ?? const Duration(milliseconds: 200),
        curve: curve,
        constraints: contraints,
        showDragHandle: showDragHandle,
        dragHandleColor: dragHandleColor,
        dragHandleSize: dragHandleSize,
        onDragEnd: onDragEnd,
        onDragStart: onDragStart,
        shadowColor: shadowColor,
      ),
    );