PrismAdaptiveSheet class

Shows a surface that adapts to the window: a bottom sheet on compact windows, a centred dialog on wide ones.

The same call site works everywhere. On a phone the user swipes it up from the bottom; on a desktop window it becomes a polite dialog that does not stretch across a 27-inch monitor.

final confirmed = await PrismAdaptiveSheet.show<bool>(
  context: context,
  title: 'Delete note?',
  child: const Text('This cannot be undone.'),
  actions: [
    PrismSheetAction(label: 'Cancel', value: false),
    PrismSheetAction(label: 'Delete', value: true, isDestructive: true),
  ],
);

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

show<T>({required BuildContext context, required Widget child, String? title, String? subtitle, List<PrismSheetAction<T>> actions = const [], bool isScrollControlled = true, bool isDismissible = true, bool useSafeArea = true, double maxDialogWidth = 460, Widget? header, bool showDragHandle = true, Color? backgroundColor}) → Future<T?>
Shows the adapted surface and resolves with the value passed to Navigator.pop — either from an action, a drag-dismiss (null) or the barrier (null).