GlassXContainer class
A glass-surfaced container that blurs its background content.
GlassXContainer is the primary building block for glass UI layouts. It is equivalent to a regular Container with a BackdropFilter / native blur applied, plus a semi-transparent frosted-glass decoration.
Config is inherited from the nearest GlassXProvider and can be overridden per-instance.
Example:
GlassXContainer(
blur: 20,
padding: EdgeInsets.all(16),
child: Text('Glass content'),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- GlassXContainer
Constructors
- GlassXContainer({Key? key, double? blur, double? opacity, double? borderRadius, Color? tintColor, Color? borderColor, double? borderWidth, Widget? child, double? width, double? height, EdgeInsetsGeometry padding = const EdgeInsets.all(16.0), EdgeInsetsGeometry? margin, AlignmentGeometry alignment = Alignment.center})
-
const
Properties
- alignment → AlignmentGeometry
-
Alignment of child within the container.
final
- blur → double?
-
Override blur strength (0–40). Inherits from config if null.
final
- borderColor → Color?
-
Override border color.
final
- borderRadius → double?
-
Override corner radius. Inherits from config if null.
final
- borderWidth → double?
-
Override border width.
final
- child → Widget?
-
The child widget to display inside this container.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Container height.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- margin → EdgeInsetsGeometry?
-
Margin applied outside the glass surface.
final
- opacity → double?
-
Override fill opacity (0.0–1.0). Inherits from config if null.
final
- padding → EdgeInsetsGeometry
-
Padding applied inside the glass surface.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tintColor → Color?
-
Override tint color.
final
- width → double?
-
Container width.
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