showBottomSheet method

void showBottomSheet(
  1. BuildContext context, {
  2. ThemeData? themeData,
  3. Color? backgroundColor,
  4. 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 sheet
  • themeData - Optional theme for styling
  • backgroundColor - Background color of the bottom sheet
  • builder - 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);
}