showWithHandler static method
BottomSheetHandler
showWithHandler(
- BuildContext context, {
- String? title,
- String? message,
- required List<
ActionSheetItem> actions, - String? cancelText,
- bool showCancel = true,
Implementation
static BottomSheetHandler showWithHandler(
BuildContext context, {
bool useRootNavigator = false,
String? title,
String? message,
required List<ActionSheetItem> actions,
String? cancelText,
bool showCancel = true,
}) {
final handler = BottomSheetHandler();
final route = ActionSheet.showModalBottomSheetBySystem(
context: context,
useRootNavigator: useRootNavigator,
backgroundColor: Colors.transparent,
builder: (buildContext) {
return _createWidget(buildContext,
title: title, message: message, actions: actions, showCancel: showCancel, cancelText: cancelText);
},
);
final navigator = Navigator.of(context, rootNavigator: useRootNavigator);
handler._navigatorState = navigator;
handler._route = route;
BottomSheetGuard.instance.trackRoute(route);
return handler;
}