SheetMorphGeometry class
Pure geometry for presenting a GlassModalSheet with a liquid morph.
Stateless and free of BuildContext, so every value the morph renders can
be unit-tested without a widget tree — the same contract
LiquidMorphPhysics follows.
LiquidMorphPhysics answers how far along the morph is; this answers where the sheet actually sits, so the droplet can be aimed at it.
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
-
blobRadius(
{required Size blobSize, required double target, required double sizeT}) → double -
Corner radius of the droplet as it inflates from
triggerinto the sheet. -
blobRect(
{required Rect trigger, required Rect destination, required double pathT, required double sizeT, double scaleDelta = 1.0, bool isClosing = false, double travelDx = 0.0, double travelDy = 0.0}) → Rect - The frame of the travelling droplet (Blob B) for one morph frame.
-
dampedDismissTravel(
double travel, {required double cardFraction}) → double - The travel the sheet actually renders at, given what the finger did.
-
dismissedRect(
{required Rect restingRect, required double travel, required double screenHeight, double horizontalOffset = 0.0, Offset? scaleAnchor}) → Rect - The frame a sheet occupies mid-swipe, in global coordinates — the morph's destination when a swipe is what closed the sheet.
-
dismissPivotState(
SheetGeometry geometry) → GlassSheetState - The detent a swipe-to-dismiss drag falls away from.
-
dismissScale(
double travel, {required double cardFraction}) → double -
Uniform scale the sheet wears
travelinto a swipe-to-dismiss. -
dismissTravel(
{required double position, required double minPosition}) → double - How far the sheet has been dragged below its lowest detent, as a fraction of screen height.
-
fillReveal(
double sizeT) → double - Opacity of the droplet's solid fill, ramping in over the last 30 % of the size curve so the glass droplet has already arrived before it takes on the sheet's opaque surface.
-
horizontalOffsetFor(
{required double rawOffset, required Rect cardRect, required double screenWidth}) → double - The sideways offset the chase spring is targeted with, given the finger's raw offset.
-
restingFillOpacity(
{required GlassSheetState state, required LiquidGlassSettings baseSettings, required bool enablePeek, LiquidGlassSettings? peekSettings, LiquidGlassSettings? halfSettings, LiquidGlassSettings? fullSettings}) → double -
Opacity the sheet's solid fill rests at in
state. -
restingRect(
{required GlassSheetState state, required SheetGeometry geometry, required Size screenSize, required double horizontalMargin, required double bottomMargin, required double bottomInset, required double bottomRadius, double? peekHorizontalMargin, double? peekBottomMargin, double? peekWidth, GlassSheetPlacement? stripPlacement, bool regularWidth = false, TextDirection textDirection = TextDirection.ltr}) → Rect -
The frame the sheet comes to rest in for
state, in global coordinates. -
restingSettings(
{required GlassSheetState state, required LiquidGlassSettings baseSettings, required bool enablePeek, LiquidGlassSettings? peekSettings, LiquidGlassSettings? halfSettings, LiquidGlassSettings? fullSettings}) → LiquidGlassSettings -
The glass settings the sheet rests on in
state, before the solid fill is composited over them. Mirrors the settings interpolation in_calculateMetricsat rest. -
rubberBand(
double offset, {required double limit, double tension = 1.0}) → double - iOS's rubber-band curve: direct at first, asymptotically stiffer.
Constants
- dismissScaleGain → const double
- Rate the swipe-to-dismiss shrink loses scale, per unit of the card's own height dragged.
- minDismissScale → const double
- Size the shrink asymptotes toward, and never reaches.