showBottomSheet function

void showBottomSheet(
  1. BuildContext context,
  2. String title, {
  3. required Widget child,
})

Shows a bottom sheet with the given title and child in the given context.

The bottom sheet is scrollable, drags, uses the root navigator, and is dismissible.

The bottom sheet is clipped at the top with a corner radius of 14 logical pixels.

The child is displayed within a ClipRRect with a circular corner radius of 14 logical pixels.

Implementation

void showBottomSheet(
  final BuildContext context,
  final String title, {
  required final Widget child,
}) {
  showModalBottomSheet<void>(
    context: context,
    isScrollControlled: true,
    useRootNavigator: true,
    builder: (final context) => _buildBottomSheet(context, title, child),
  );
}