SheetSnapshot class
Immutable snapshot of the sheet's physical state at a single moment in time.
Passed to the sheet's gesture resolver and state machine to determine target snap positions and resistance.
Constructors
- SheetSnapshot({required GlassSheetState state, required double position, double velocity = 0.0, required Size screenSize})
-
Creates an immutable sheet state snapshot.
const
Properties
- expandProgress → double
-
Normalized progress between the half and full snap positions.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- position → double
-
Sheet height as a fraction of screen height (0.0 = hidden, 1.0 = full screen).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenSize → Size
-
The screen dimensions at the time this snapshot was captured.
final
- state → GlassSheetState
-
The current logical snap state (which detent the sheet was last snapped to).
final
- velocity → double
-
Current drag velocity in logical pixels per second.
Positive values mean the sheet is moving upward (expanding).
final
Methods
-
copyWith(
{GlassSheetState? state, double? position, double? velocity, Size? screenSize}) → SheetSnapshot - Returns a copy of this snapshot with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited