show<T> static method
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,
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,
),
);
}