GlassEffect class
Enhanced glass renderer specifically for interactive indicators.
Uses a specialized shader on Skia/Web to match Impeller's visual quality with magnification effects, enhanced rim lighting, and radial brightness.
On Impeller with premium quality, it uses the native LiquidGlass renderer. On Skia/Web or standard quality, it uses the enhanced GlassEffect shader with magnification and structural rim effects.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- GlassEffect
Constructors
-
GlassEffect({required LiquidShape shape, required LiquidGlassSettings settings, required double interactionIntensity, required Widget child, GlassQuality quality = GlassQuality.standard, double densityFactor = 0.0, GlobalKey<
State< ? backgroundKey, double ambientRim = 0.1, double baseAlphaMultiplier = 0.2, double edgeAlphaMultiplier = 0.4, double rimThickness = 0.5, double rimSmoothing = 1.5, Key? key})StatefulWidget> > -
const
Properties
- ambientRim → double
-
Minimum rim brightness regardless of light direction (default: 0.1)
final
-
backgroundKey
→ GlobalKey<
State< ?StatefulWidget> > -
GlobalKey of a RepaintBoundary wrapping the background content.
Used for Skia/Web background sampling.
final
- baseAlphaMultiplier → double
-
Center transparency multiplier (default: 0.2)
final
- child → Widget
-
final
- densityFactor → double
-
Defaults to 0.0.
final
- edgeAlphaMultiplier → double
-
Edge opacity multiplier (default: 0.4)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- interactionIntensity → double
-
Interaction intensity (0.0 = resting, 1.0 = fully active)
Drives magnification and enhancement effects
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- quality → GlassQuality
-
final
- rimSmoothing → double
-
Rim edge smoothing multiplier (default: 1.5)
final
- rimThickness → double
-
Rim offset/thickness in logical pixels (default: 0.5)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settings → LiquidGlassSettings
-
final
- shape → LiquidShape
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< GlassEffect> -
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
-
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