modal<T> static method
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 isDismissible = true,
- bool enableDrag = true,
- bool? showDragHandle,
- bool useSafeArea = false,
- RouteSettings? routeSettings,
- AnimationController? transitionAnimationController,
- 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,
);
}