Present a sheet: show raises a transient one from a control (a
category, an amount, a confirm) over the whole app; pageRoute is the
route a declared sheet PAGE rides, created on the root navigator by the
route code (LedgerSheetPage): that page is a plain LedgerScreen,
whose bar becomes the sheet's head with its close.
On a phone both rise off the bottom edge over the scrim, on ui_core's DesignBottomSheetRoute: a drag moves the sheet with the finger and a drag down or a fling lets it go. At desktop width both stand centred as a dialog, on ui_core's DesignDialogRoute, fading in. Both move on ui_core's springs (a short fade under Reduce Motion), keep the focus in them and give it back as they close; a tap on the scrim, Escape, the system back or the close dismisses them.
final picked = await LedgerSheet.show<String>(context, title: 'Category', builder: (context) => [options]);
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
-
dialogWidth(
{bool confirm = false}) → double -
The dialog's width at desktop width: 480 for a task, 440 for a
confirm(the source's.modal-sheet.dialog). -
maxHeight(
BuildContext context) → double -
The tallest a sheet stands on the screen
contextreads: 90% of it on a phone, 84% at desktop width. -
motionOf(
BuildContext context) → AnimationStyle -
Ledger's timed rise and fall above
context(none at all where the platform asks for reduced motion), for an app's own transition that should keep time with Ledger's. Ledger's sheets and dialogs move on ui_core's springs since 0.3.0 (their routes'stiffness). -
pageRoute<
T> ({required BuildContext context, required WidgetBuilder builder, RouteSettings? settings, bool drawer = false, bool confirm = false}) → Route< T> -
The modal route a declared sheet page rides: the page stands on the
sheet's card at the tallest a sheet stands, or with
draweras tall as its content (a short task that leaves the page it came from in view). At desktop width it is the centred dialog, narrower for aconfirm. -
show<
T> (BuildContext context, {required String title, required List< Widget> builder(BuildContext context), List<Widget> foot(BuildContext context)?, bool close = true, bool confirm = false}) → Future<T?> -
Raises a transient sheet over the whole app (the app's root navigator,
LedgerHost.navigatorOf): an LedgerSheetShell headed by
title, holdingbuilder's parts andfoot's acts.confirmmarks a question its foot's acts answer (Freeze your card?), which at desktop width stands narrower than a task's. Completes with the value the sheet pops with: null when it is dismissed (the close, a drag down, the scrim).