LiquidGlass class

A pane of glass behind child, after iOS's Liquid Glass, a pill unless clipper shapes it. It casts shadows only outside itself, as one under it would show through. Without Impeller's shader filters it frosts but does not bend.

Inheritance

Constructors

LiquidGlass({Key? key, required LiquidGlassStyle style, BorderRadius? borderRadius, CustomClipper<Path>? clipper, List<BoxShadow> shadows = const [], bool pressed = false, LiquidGlassGlow? glow, Rect? hold, bool steadyFrost = false, Widget? child})
const

Properties

borderRadius → BorderRadius?
Rounds each corner on its own in place of the pill.
final
child → Widget?
final
clipper → CustomClipper<Path>?
Shapes the pane to its path in place of the pill. The glass bends to the path by how far it reaches from the pane's center in each direction, so it must meet every ray from the center once.
final
glow → LiquidGlassGlow?
Lights the pane in place of the glow pressed lights at its center.
final
hashCode → int
The hash code for this object.
no setterinherited
hold → Rect?
As LiquidGlassPane.paint takes it, but from the pane's top left.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
pressed → bool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shadows → List<BoxShadow>
final
steadyFrost → bool
final
style → LiquidGlassStyle
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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

Static Methods

buttonBackground(LiquidGlassStyle styleOf(Set<WidgetState> states)) → ButtonLayerBuilder
Stands a button's content on glass, for a button with no fill.
withoutPanes<T>(T capture()) → T
Builds the scenes of capture without panes, for a snapshot: offscreen a pane has no backdrop to bend and comes out a flat tint.