SheetStage class abstract

A snap position for a PinnedSheet.

A stage resolves to a visible extent (logical pixels) along the sheet's axis (resolveDragOffset) and, independently, to a backdrop transform value in 0..1 (resolveBackdropTransform). When a stage's explicit backdropTransform is null it falls back to the stage's normalized expansion (offset / axis extent).

Stages support arithmetic so you can express derived snap points:

SheetStage.expanded() - SheetStage.fixed(100); // 100px short of full
SheetStage.expanded() * 0.9;                    // 90% of full
SheetStage.fixed(100) + SheetStage.fraction(0.5);

Built-in stages: SheetStage.closed, SheetStage.expanded, SheetStage.fixed, SheetStage.fraction, SheetStage.peekDragHandle.

Implementers

Constructors

SheetStage()
Const constructor for subclasses.
const
SheetStage.closed({double? backdropTransform})
A fully-hidden stage (offset 0).
const
factory
SheetStage.expanded({double? backdropTransform})
A fully-shown stage (offset == the full axis extent).
const
factory
SheetStage.fixed(double offset, {double? backdropTransform})
A stage pinned at a fixed number of logical pixels from the edge.
const
factory
SheetStage.fraction(double fraction, {double? backdropTransform})
A stage pinned at a fraction (0..1) of the sheet's axis extent.
const
factory
SheetStage.peekDragHandle({double? backdropTransform})
A stage that peeks only the drag handle. For containers without a drag handle the handle extent is 0, so this behaves like SheetStage.closed.
const
factory

Properties

hashCode → int
The hash code for this object.
no setteroverride
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
resolveBackdropTransform(SheetStageResolution resolution) → double
The backdrop transform value (0..1) this stage resolves to.
resolveDragOffset(SheetStageResolution resolution) → double
The visible extent (logical pixels) this stage resolves to.
toString() → String
A string representation of this object.
inherited

Operators

operator *(double factor) → SheetStage
Scales this stage's offset and backdrop transform by factor.
operator +(SheetStage other) → SheetStage
Sum of two stages (offsets and backdrop transforms are added).
operator -(SheetStage other) → SheetStage
Difference of two stages (offsets and backdrop transforms are subtracted).
operator /(double factor) → SheetStage
Divides this stage's offset and backdrop transform by factor.
operator ==(Object other) → bool
The equality operator.
override