showBottomSheet static method
void
showBottomSheet(
- BuildContext context,
- Widget widget, {
- Color? color,
- bool isScrollControlled = true,
- bool enableDrag = false,
- RouteSettings routeSettings = const RouteSettings(name: "bottomSheet"),
展示 bottomSheet
Implementation
static void showBottomSheet(
BuildContext context,
Widget widget, {
Color? color,
bool isScrollControlled = true,
bool enableDrag = false,
RouteSettings routeSettings = const RouteSettings(name: "bottomSheet"),
}) {
showModalBottomSheet(
context: context,
isScrollControlled: isScrollControlled,
enableDrag: enableDrag,
barrierColor: color ?? Colors.black.withAlpha(1),
backgroundColor: Colors.transparent,
useRootNavigator: true,
routeSettings: routeSettings,
builder: (context) {
return widget;
});
}