show<T> static method

Future<T?> show<T>({
  1. required BuildContext context,
  2. required Widget child,
  3. String? title,
  4. Widget? titleWidget,
  5. bool isDismissible = true,
  6. bool enableDrag = true,
  7. bool showDragHandle = true,
  8. double? height,
  9. double maxHeight = 0.9,
  10. Color? backgroundColor,
  11. EdgeInsets? padding,
  12. bool isScrollControlled = true,
  13. bool showCloseButton = false,
  14. VoidCallback? onClose,
})

Implementation

static Future<T?> show<T>({
  required BuildContext context,
  required Widget child,
  String? title,
  Widget? titleWidget,
  bool isDismissible = true,
  bool enableDrag = true,
  bool showDragHandle = true,
  double? height,
  double maxHeight = 0.9,
  Color? backgroundColor,
  EdgeInsets? padding,
  bool isScrollControlled = true,
  bool showCloseButton = false,
  VoidCallback? onClose,
}) {
  return showModalBottomSheet<T>(
    context: context,
    isDismissible: isDismissible,
    enableDrag: enableDrag,
    isScrollControlled: isScrollControlled,
    backgroundColor: Colors.transparent,
    barrierColor: AtomicColors.gray900.withValues(alpha: 0.5),
    shape: const RoundedRectangleBorder(
      borderRadius: BorderRadius.vertical(
        top: Radius.circular(AtomicBorders.radiusXl),
      ),
    ),
    builder: (context) => _AtomicBottomSheetContent(
      title: title,
      titleWidget: titleWidget,
      height: height,
      maxHeight: maxHeight,
      backgroundColor: backgroundColor,
      padding: padding,
      showDragHandle: showDragHandle,
      showCloseButton: showCloseButton,
      onClose: onClose,
      child: child,
    ),
  );
}