GlassMorphAnchor class

The widget a presented glass overlay (such as GlassModalSheet or showGlassConfirmationDialog) morphs out of, and the channel that empties it while the morph is in flight.

Close to an opaque token: GlassMorphTrigger creates one, hands it to its builder, and disposes it; callers pass it straight to morphFrom: and never touch it otherwise. All it reports back is isPresenting, for chrome that has to know whether the trigger it drew is currently standing in for a presented overlay. The constructor is private so one cannot be made by hand — an anchor with no trigger behind it has nothing to empty.

Why a token rather than a bare GlobalKey

A key can only locate the trigger. Reading its rect is enough to aim the morph, but not to make the trigger look like it empties — and a trigger that stays painted while a glass droplet inflates on top of it reads as a duplicated button, not a morph. Nothing in Flutter lets one widget hide another it does not own, so the trigger has to cooperate: GlassMorphTrigger owns the key and the opacity, and this token is how the presented overlay reaches back to it.

GlassMenu does the same thing internally with its own trigger; this is that arrangement made available to a trigger the overlay does not own.

Properties

hashCode → int
The hash code for this object.
no setterinherited
isPresenting → bool
Whether the trigger is currently emptied for a presented overlay.
no setter
presentationChanges → Listenable
Notifies when isPresenting changes.
no setter
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