Overlay

Persistent Sheet

A persistent sheet is displayed above another widget while still allowing users to interact with the widget below.

It is part of FScaffold, which should be preferred in most cases.

A closely related widget is a modal sheet which prevents the user from interacting with the rest of the app.

All calls to showFPersistentSheet(...) should be made inside widgets that have either FScaffold or FSheets as their ancestor.

CLI

To generate a specific style for customization:

dart run forui style create persistent-sheet

Usage

showFPersistentSheet(...)

1showFPersistentSheet(
2 context: context,
3 style: const .delta(flingVelocity: 700),
4 side: .btt,
5 builder: (context, controller) => Padding(
6 padding: const .all(16),
7 child: Column(
8 mainAxisSize: .min,
9 children: [
10 const Text('Sheet content'),
11 FButton(onPress: controller.hide, child: const Text('Close')),
12 ],
13 ),
14 ),
15)

FSheets(...)

1FSheets(
2 child: Placeholder(),
3)

Examples

With KeepAliveOffstage

With DraggableScrollableSheet

On this page