Glass class
A pane of Liquid Glass: it bends what's behind it at its rim, frosts and tints it, and lights its edge, then shows its child on top.
Over a GlassBackdrop it bends the backdrop on every platform; on Impeller it bends whatever is behind it; elsewhere it frosts.
- Inheritance
Constructors
- Glass.new({Key? key, Widget? child, double borderRadius = 24, EdgeInsetsGeometry? padding, double? width, double? height, Color? tint, double? blur, double? saturation, double? bend, double? dispersion, double? rimShine, bool shadow = true, GlassMode mode = GlassMode.auto})
-
Creates a glass pane.
const
Properties
- bend → double?
-
How far the rim reaches in for what it shows, as a share of its bezel.
final
- blur → double?
-
The frost's blur deviation, in logical px.
final
- borderRadius → double
-
The corners' radius; double.infinity for a capsule.
final
- child → Widget?
-
What the pane shows on top of the glass.
final
- dispersion → double?
-
How far the colours split at the rim.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
The pane's height, in logical px; null sizes it to its parent and child.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- mode → GlassMode
-
How the glass reads what's behind it. GlassMode.auto leaves that to
the theme's GlassThemeData.mode.
final
- padding → EdgeInsetsGeometry?
-
Space between the glass's edge and child.
final
- rimShine → double?
-
How bright the rim's light is, from 0 to 1.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- saturation → double?
-
How much the glass saturates what it shows.
final
- shadow → bool
-
Whether to cast the small drop shadow.
final
- tint → Color?
-
The frost's colour, over what the glass shows. Defaults to the theme's glass.
final
- width → double?
-
The pane's width, in logical px; null sizes it to its parent and child.
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