modal<T> static method

Future<T?> modal<T>({
  1. required Widget content,
  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. double scrollControlDisabledMaxHeightRatio = _defaultScrollControlDisabledMaxHeightRatio,
  11. bool useRootNavigator = false,
  12. bool isDismissible = true,
  13. bool enableDrag = true,
  14. bool? showDragHandle,
  15. bool useSafeArea = false,
  16. RouteSettings? routeSettings,
  17. AnimationController? transitionAnimationController,
  18. Offset? anchorPoint,
})

modal Mostrara un showModalBottomSheet y requiere de un Widget y recibe todas las variables que este requiere

Implementation

static Future<T?> modal<T>({
  required Widget content,
  Color? backgroundColor,
  String? barrierLabel,
  double? elevation,
  ShapeBorder? shape,
  Clip? clipBehavior,
  BoxConstraints? constraints,
  Color? barrierColor,
  bool isScrollControlled = false,
  double scrollControlDisabledMaxHeightRatio =
      _defaultScrollControlDisabledMaxHeightRatio,
  bool useRootNavigator = false,
  bool isDismissible = true,
  bool enableDrag = true,
  bool? showDragHandle,
  bool useSafeArea = false,
  RouteSettings? routeSettings,
  AnimationController? transitionAnimationController,
  Offset? anchorPoint,
}) {
  return showModalBottomSheet<T>(
    anchorPoint: anchorPoint,
    backgroundColor: backgroundColor,
    barrierColor: barrierColor,
    barrierLabel: barrierLabel,
    clipBehavior: clipBehavior,
    constraints: constraints,
    elevation: elevation,
    enableDrag: enableDrag,
    isDismissible: isDismissible,
    isScrollControlled: isScrollControlled,
    routeSettings: routeSettings,
    scrollControlDisabledMaxHeightRatio: scrollControlDisabledMaxHeightRatio,
    shape: shape,
    showDragHandle: showDragHandle,
    useRootNavigator: useRootNavigator,
    useSafeArea: useSafeArea,
    transitionAnimationController: transitionAnimationController,
    context: _contextServ,
    builder: (context) => content,
  );
}