GlassModalSheetController class
Programmatic controller for a GlassModalSheet.
Pass to GlassModalSheet.controller or GlassModalSheetScaffold.controller to snap the sheet between states without user interaction.
One controller drives one mounted sheet at a time. The controller is safe to reuse across widget rebuilds — it guards against stale attachment during hot-swap (key changes) the same way Flutter's own ScrollController does.
Constructors
Properties
- currentState → GlassSheetState
-
The snap state the sheet is currently resting at (or animating toward).
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- progress → double
-
Live progress between the half and full snaps: 0.0 at (or below) the half
snap, 1.0 at full. Use with progressListenable to react during a drag.
no setter
- progressListenable → Listenable?
-
Notifies on every sheet position change — drag and snap animation alike.
Null until the sheet is mounted; read progress from inside the listener.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ double
-
Raw sheet position as a screen-height fraction (0.0–1.0).
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
snapToState(
GlassSheetState state, {bool animate = true, double velocity = 0}) → void -
Snaps the sheet to
state, optionally animating the transition. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited