modal_bottom_sheet
modal_bottom_sheet copied to clipboard
Expose RouteSettings in show...() methods.
I can see that ModalBottomSheetRoute has a RouteSettings parameter that is passed on to PopupRoute.
It would be cool if we could use this route settings with showMaterialModalBottomSheet() for example.
Future<T> showMaterialModalBottomSheet<T>({
...,
RouteSettings settings,
}) async {
final result = await Navigator.of(context, rootNavigator: useRootNavigator)
.push(ModalBottomSheetRoute<T>(
settings: settings,
));
return result;
}
This way we could pass arguments to new routes:
RouteSettings(arguments: [someId])
This is a great idea. I will take a look when I have more time 🙂