show<T> static method
Future<T?>
show<T>({
- required BuildContext context,
- required Widget builder(
- BuildContext,
- void (
- Future<
T> ()
- Future<
- bool isDarkTheme = false,
Implementation
static Future<T?> show<T>({
required BuildContext context,
required Widget Function(BuildContext, void Function(Future<T> Function())) builder,
bool isDarkTheme = false,
}) {
return showModalBottomSheet<T>(
context: context,
isScrollControlled: true, // allows full height scrollable sheet
backgroundColor: isDarkTheme ? ColorResource.blackColor : Colors.white,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(12),
),
),
builder: (context) {
return _BottomSheetContent<T>(
builder: builder,
);
},
);
}