SheetPage<T> class

A page that creates a material style SheetRoute.

By default, when a modal route is replaced by another, the previous route remains in memory. To free all the resources when this is not necessary, set maintainState to false.

The fullscreenDialog property specifies whether the incoming route is a fullscreen modal dialog. On iOS, those routes animate from the bottom to the top rather than horizontally.

The type T specifies the return type of the route which can be supplied as the route is popped from the stack via Navigator.pop by providing the optional result argument.

See also:

  • SheetPageRoute, which is the PageRoute version of this class
Inheritance

Constructors

SheetPage({required Widget child, bool maintainState = true, LocalKey? key, String? name, Object? arguments, double initialExtent = 1, List<double>? stops, bool draggable = true, SheetFit fit = SheetFit.expand, SheetPhysics? physics, Curve? animationCurve, Duration? duration, String? sheetLabel, String? barrierLabel, Color? barrierColor = _kBarrierColor, bool barrierDismissible = true, double willPopThreshold = _kWillPopThreshold, SheetDecorationBuilder? decorationBuilder})
Creates a material page.
const

Properties

animationCurve Curve?
Curve for the transition animation
final
arguments Object?
The arguments passed to this route.
finalinherited
barrierColor Color?
final
barrierDismissible bool
final
barrierLabel String?
final
child Widget
The content to be shown in the Route created by this page.
final
decorationBuilder SheetDecorationBuilder?
Wraps the child in a custom sheet decoration appearance
final
draggable bool
Defines if the sheet can be translated by user dragging. If false the route can still be closed by tapping the barrier if barrierDismissible is true or by Navigator.pop
final
fit SheetFit
How to size the builder content in the sheet route.
final
hashCode int
The hash code for this object.
no setterinherited
initialExtent double
Relative extent up to where the sheet is animated when pushed for the first time. Values can't only be between
final
key LocalKey?
The key associated with this page.
finalinherited
maintainState bool
final
name String?
The name of the route (e.g., "/settings").
finalinherited
physics SheetPhysics?
Determines the physics of a Sheet widget.
final
restorationId String?
Restoration ID to save and restore the state of the Route configured by this page.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sheetLabel String?
The semantic label used for a sheet modal route.
final
stops List<double>?
Possible stops where the sheet can be snapped when dragged Values can only be between 0 and 1 By default it is null
final
transitionDuration Duration
The duration the transition going forwards.
final
willPopThreshold double
Drag threshold to block any interaction if Route.willPop returns false See also:
final

Methods

canUpdate(Page other) bool
Whether this page can be updated with the other page.
inherited
createRoute(BuildContext context) Route<T>
Creates the Route that corresponds to this page.
override
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