open<T> method
Future<T?>
open<T>(
- BuildContext context, {
- required WidgetBuilder builder,
- bool displayDragHandle = true,
- bool dismissible = true,
- bool draggable = true,
- PathRouteSettings? settings,
- double? width,
- double? height,
- bool expand = false,
- bool nestModals = false,
- Constraints? constraints,
- dynamic extraOptions,
override
Implementation
@override
Future<T?> open<T>(
BuildContext context, {
required builder,
bool displayDragHandle = true,
bool dismissible = true,
bool draggable = true,
PathRouteSettings? settings,
double? width,
double? height,
bool expand = false,
bool useRootNavigator = true,
bool nestModals = false,
Constraints? constraints,
extraOptions,
}) {
Widget? w;
return showMaterialModalBottomSheet<T>(
context: context,
useRootNavigator: useRootNavigator,
bounce: true,
expand: expand,
enableDrag: draggable,
backgroundColor: sunnyColors.modalBackground,
isDismissible: dismissible,
builder: (context) {
return w ??= displayDragHandle
? builder(context).withDragHandle()
: builder(context);
},
);
}