BackdropFilter.grouped constructor
- Key? key,
- ImageFilter? filter,
- ImageFilterConfig? filterConfig,
- Widget? child,
- BlendMode blendMode = BlendMode.srcOver,
- bool enabled = true,
Creates a backdrop filter that groups itself with the nearest parent BackdropGroup.
The blendMode argument will default to BlendMode.srcOver and must not be
null if provided.
This constructor will automatically look up the nearest BackdropGroup and will share the backdrop input with sibling and child BackdropFilter widgets.
Exactly one of filter or filterConfig must be provided.
Providing both or neither will result in an assertion error.
Implementation
const BackdropFilter.grouped({
super.key,
this.filter,
this.filterConfig,
super.child,
this.blendMode = BlendMode.srcOver,
this.enabled = true,
}) : assert(
filter != null || filterConfig != null,
'Either filter or filterConfig must be provided.',
),
assert(
filter == null || filterConfig == null,
'Cannot provide both a filter and a filterConfig.',
),
backdropGroupKey = null,
_useSharedKey = true;