Acrylic constructor
const
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.
Implementation
const Acrylic({
Key? key,
this.color,
this.decoration,
this.filter,
this.child,
this.opacity = kDefaultAcrylicOpacity,
this.width,
this.height,
this.padding,
this.margin,
this.shadowColor,
this.elevation = 0.0,
this.enabled,
}) : assert(elevation >= 0, 'The elevation can NOT be negative'),
assert(opacity >= 0, 'The opacity can NOT be negative'),
assert(
elevation == 0.0 || opacity == 1.0,
'You can NOT provide both opacity and elevation',
),
super(key: key);