Acrylic class
Acrylic is a type of Brush that creates a translucent texture. You can apply acrylic to app surfaces to add depth and help establish a visual hierarchy.
- Inheritance
Constructors
- Acrylic({Key? key, Color? color, BoxDecoration? decoration, ImageFilter? filter, Widget? child, double opacity = kDefaultAcrylicOpacity, double? width, double? height, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Color? shadowColor, double elevation = 0.0, bool? enabled})
-
The color and decoration arguments can not be both supplied.
const
Properties
- child → Widget?
-
The child contained by this box
final
- color → Color?
-
The color to fill the background of the box
final
- decoration → BoxDecoration?
-
The decoration to paint behind the child.
final
- elevation → double
-
The z-coordinate relative to the parent at which to place this physical object.
final
- enabled → bool?
-
Whether the acrylic effect is enabled. This is usually disabled
when the system is in battery-save mode. If null, acrylicEnabled
is used.
final
- filter → ImageFilter?
-
The image filter to apply to the existing painted content before painting the
child. If null, kDefaultAcrylicFilter is used. If enabled if
false
, this has no effect.final - hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
The height of the box
final
- isEnabled → bool
-
Whether this acrylic widget is enabled or not.
no setter
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- margin → EdgeInsetsGeometry?
-
Empty space to surround the decoration and child.
final
- opacity → double
-
The opacity applied to the color from 0.0 to 1.0. If enabled is
false
, this has no effectfinal - padding → EdgeInsetsGeometry?
-
Empty space to inscribe inside the decoration.
The child, if any, is placed inside this padding.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shadowColor → Color?
-
The color of the elevation
final
- width → double?
-
The width of the box
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.
override
-
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}) → 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 Properties
- acrylicEnabled ↔ bool
-
Whether the acrylic blur effect is enabled. This value is used globally,
but can be overwritten using the enabled property. This is usually disabled
when the system is in battery-save mode.
getter/setter pair