OudsModalBottomSheet class

A modal bottom sheet that temporarily blocks interaction with the main screen, displaying secondary content anchored to the bottom.

The sheet appears in front of app content with a scrim overlay, and remains on screen until dismissed by the user (tap outside, swipe down, or back button).

Height

The sheet occupies up to 95 % of the available body height (screen minus status bar and toolbar), ensuring the top bar stays visible.

Drag handle

When dragHandle is true (default), a custom OUDS drag handle pill is displayed at the top of the sheet, matching the Android implementation.

Usage

OudsModalBottomSheet(
  dragHandle: true,
  sheetGesturesEnabled: true,
  builder: (context) {
    return Text('Sheet content');
  },
).show(context: context);

Parameters

  • dragHandle – Whether to show the drag handle pill (default true).
  • builder – Builder for the sheet content.
  • sheetGesturesEnabled – Whether swipe-to-dismiss is enabled (default true). Maps to Flutter's enableDrag parameter.

See also

Constructors

OudsModalBottomSheet({bool dragHandle = true, required WidgetBuilder builder, bool sheetGesturesEnabled = true})
const

Properties

builder → WidgetBuilder
Builder for the sheet content.
final
dragHandle → bool
Whether to show the drag handle pill.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sheetGesturesEnabled → bool
Whether drag gestures are enabled. Maps to Flutter's showModalBottomSheet.enableDrag.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
show<T>({required BuildContext context, VoidCallback? onDismissRequest, bool isScrollControlled = true, bool useRootNavigator = false, RouteSettings? routeSettings}) → Future<T?>
Display this OudsModalBottomSheet as a modal dialog.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited