showBottomSheet method
void
showBottomSheet(
- BuildContext context, {
- ThemeData? themeData,
- Color? backgroundColor,
- PickerWidgetBuilder? builder,
Shows the picker in a persistent bottom sheet.
The bottom sheet remains visible until dismissed by user interaction or programmatically closed.
Parameters:
context
- Build context for showing the bottom sheetthemeData
- Optional theme for stylingbackgroundColor
- Background color of the bottom sheetbuilder
- Optional custom builder to wrap the picker
Example:
picker.showBottomSheet(context);
Implementation
void showBottomSheet(
BuildContext context, {
material.ThemeData? themeData,
Color? backgroundColor,
PickerWidgetBuilder? builder,
}) {
material.Scaffold.of(context).showBottomSheet((BuildContext context) {
final picker = makePicker(themeData);
return builder == null ? picker : builder(context, picker);
}, backgroundColor: backgroundColor);
}