show<T> static method

Future<T?> show<T>({
  1. required BuildContext context,
  2. required Widget child,
  3. ModulaBottomSheetType type = ModulaBottomSheetType.standard,
  4. bool isDismissible = true,
  5. bool enableDrag = true,
  6. bool useRootNavigator = true,
  7. Color? backgroundColor,
  8. double? elevation,
  9. ShapeBorder? shape,
  10. Clip? clipBehavior,
  11. AnimationController? transitionAnimationController,
  12. double initialChildSize = 0.5,
  13. double minChildSize = 0.25,
  14. double maxChildSize = 1.0,
  15. List<double>? snapSizes,
  16. 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,
      );
  }
}