show<T> static method
Future<T?>
show<T>({
- required BuildContext context,
- required Widget child,
- ModulaBottomSheetType type = ModulaBottomSheetType.standard,
- bool isDismissible = true,
- bool enableDrag = true,
- Color? backgroundColor,
- double? elevation,
- ShapeBorder? shape,
- Clip? clipBehavior,
- AnimationController? transitionAnimationController,
- double initialChildSize = 0.5,
- double minChildSize = 0.25,
- double maxChildSize = 1.0,
- List<
double> ? snapSizes, - bool snap = false,
Implementation
static Future<T?> show<T>({
required BuildContext context,
required Widget child,
ModulaBottomSheetType type = ModulaBottomSheetType.standard,
bool isDismissible = true,
bool enableDrag = true,
bool useRootNavigator = true,
Color? backgroundColor,
double? elevation,
ShapeBorder? shape,
Clip? clipBehavior,
AnimationController? transitionAnimationController,
double initialChildSize = 0.5,
double minChildSize = 0.25,
double maxChildSize = 1.0,
List<double>? snapSizes,
bool snap = false,
}) {
switch (type) {
case ModulaBottomSheetType.standard:
return _showStandardBottomSheet<T>(
context: context,
child: child,
isDismissible: isDismissible,
enableDrag: enableDrag,
useRootNavigator: useRootNavigator,
backgroundColor: backgroundColor,
elevation: elevation,
shape: shape,
clipBehavior: clipBehavior,
transitionAnimationController: transitionAnimationController,
);
case ModulaBottomSheetType.scrollable:
return _showScrollableBottomSheet<T>(
context: context,
child: child,
isDismissible: isDismissible,
enableDrag: enableDrag,
useRootNavigator: useRootNavigator,
backgroundColor: backgroundColor,
elevation: elevation,
shape: shape,
clipBehavior: clipBehavior,
transitionAnimationController: transitionAnimationController,
initialChildSize: initialChildSize,
minChildSize: minChildSize,
maxChildSize: maxChildSize,
);
case ModulaBottomSheetType.fullScreen:
return _showFullScreenBottomSheet<T>(
context: context,
child: child,
isDismissible: isDismissible,
enableDrag: enableDrag,
useRootNavigator: useRootNavigator,
backgroundColor: backgroundColor,
elevation: elevation,
shape: shape,
clipBehavior: clipBehavior,
transitionAnimationController: transitionAnimationController,
initialChildSize: initialChildSize,
minChildSize: minChildSize,
maxChildSize: maxChildSize,
snapSizes: snapSizes,
snap: snap,
);
}
}