GlassSheetMorphPresenter class

Drives the liquid morph that presents child (a GlassModalSheetScaffold).

Owns a GlassMorphController and renders the two-blob droplet while the morph is in flight, swapping to the real sheet at the settled instant.

The route's own animation is used only as a signal — its reverse status starts the closing morph — never as the morph's clock. Mapping the engine onto a linear route animation would discard the J-curve and the underdamped catch, which are the whole effect.

Inserted by GlassModalSheet.show when a trigger is supplied; it is not part of the package's public surface, but is left constructible so the morph can be driven directly in tests (headless test runs report no Impeller, so show() itself always takes the slide fallback there).

Inheritance
Available extensions

Constructors

GlassSheetMorphPresenter({Key? key, required Animation<double> routeAnimation, required Rect triggerRect, required GlassMorphAnchor? anchor, required MorphSpeed speed, required GlassSheetState restingState, required GlassModalSheetController controller, required SheetGeometry geometry, required double horizontalMargin, required double bottomMargin, required double? topBorderRadius, required double? fullTopBorderRadius, required double? bottomBorderRadius, required double? fullBottomBorderRadius, required LiquidGlassSettings? settings, required LiquidGlassSettings? peekSettings, required LiquidGlassSettings? halfSettings, required LiquidGlassSettings? fullSettings, required Color? expandedColor, required GlassQuality? quality, required double? peekHorizontalMargin, required double? peekBottomMargin, required double? peekWidth, required double? peekTopBorderRadius, required bool platformViewBackdrop, required Widget child, Color? expandedDarkColor, Color? barrierColor, GlassSheetPlacement placement = GlassSheetPlacement.automatic})
Creates a new GlassSheetMorphPresenter.
const

Properties

anchor → GlassMorphAnchor?
The trigger this morph can empty, when there is one.
final
barrierColor → Color?
The colour of the modal scrim that appears behind the sheet during the morph. When non-null, the presenter drives this scrim itself via the liquid spring so it is in lockstep with the blob — identical to how GlassMenu has no independently-animating route barrier.
final
bottomBorderRadius → double?
See GlassModalSheet.bottomBorderRadius.
final
bottomMargin → double
See GlassModalSheet.bottomMargin.
final
child → Widget
The real sheet. Mounted for the whole morph — never remounted at the handoff — so its glass layers and springs are already seeded when it is revealed.
final
controller → GlassModalSheetController
The sheet's controller, read once at a swipe-dismissal to learn the position the finger let go at. Shared with the sheet itself, so both sides of the handoff agree on where it was.
final
expandedColor → Color?
See GlassModalSheet.expandedColor.
final
expandedDarkColor → Color?
See GlassModalSheet.expandedDarkColor.
final
fullBottomBorderRadius → double?
See GlassModalSheet.fullBottomBorderRadius.
final
fullSettings → LiquidGlassSettings?
See GlassModalSheet.fullSettings.
final
fullTopBorderRadius → double?
See GlassModalSheet.fullTopBorderRadius.
final
geometry → SheetGeometry
Detent configuration, shared with the sheet so both resolve the same resting position.
final
halfSettings → LiquidGlassSettings?
See GlassModalSheet.halfSettings.
final
hashCode → int
The hash code for this object.
no setterinherited
horizontalMargin → double
Sheet margins and radii, forwarded so the droplet lands on the sheet's exact frame.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
peekBottomMargin → double?
See GlassModalSheet.peekBottomMargin.
final
peekHorizontalMargin → double?
See GlassModalSheet.peekHorizontalMargin.
final
peekSettings → LiquidGlassSettings?
See GlassModalSheet.peekSettings.
final
peekTopBorderRadius → double?
See GlassModalSheet.peekTopBorderRadius.
final
peekWidth → double?
See GlassModalSheet.peekWidth.
final
placement → GlassSheetPlacement
See GlassModalSheet.placement.
final
platformViewBackdrop → bool
See GlassModalSheet.platformViewBackdrop. Suppresses the metaball blend group, exactly as it does in the sheet and in GlassMenu.
final
quality → GlassQuality?
See GlassModalSheet.quality.
final
restingState → GlassSheetState
The detent the sheet comes to rest at — the morph's destination.
final
routeAnimation → Animation<double>
The presenting route's animation. Watched for AnimationStatus.reverse so the closing morph starts the moment the route begins popping.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
settings → LiquidGlassSettings?
See GlassModalSheet.settings.
final
speed → MorphSpeed
Speed profile forwarded to the GlassMorphController.
final
topBorderRadius → double?
See GlassModalSheet.topBorderRadius.
final
triggerRect → Rect
Global rect of the widget the sheet morphs out of.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<GlassSheetMorphPresenter>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
glassContextMenu({Key? key, required List<Widget> actions, WidgetBuilder? previewBuilder, bool enabled = true, bool enableHaptics = true, double borderRadius = 32.0, double? previewBorderRadius, double rowBorderRadius = 16.0, BorderRadius? rowCorners, Color? originSlotColor, Color? backgroundColor, LiquidGlassSettings? settings, GlassQuality? quality, double backdropBlur = 0.0, Color? barrierColor, double menuWidth = 250.0, VoidCallback? onOpened, VoidCallback? onDismissed, Duration longPressDuration = const Duration(milliseconds: 700)}) → Widget

Available on Widget, provided by the GlassContextMenuExtension extension

Wraps this widget in a GlassContextMenu displaying actions on long-press or right-click.
glassFullScreenCover({required bool isPresented, VoidCallback? onDismiss, required WidgetBuilder content, bool enableSwipeToDismiss = true, double dismissThreshold = 140.0, LiquidGlassSettings? settings, GlassQuality? quality}) → Widget

Available on Widget, provided by the GlassFullScreenCoverExtension extension

Presents a full-viewport modal cover whenever isPresented is true.

Available on Widget, provided by the GlassNavigationTitleExtension extension

Annotates this widget with a navigation title that drives enclosing or descendant GlassAppBar / GlassAppBar.pinned bars (when their explicit title is null) as well as header accessibility semantics.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited