StacBackdropFilter class

A Stac model representing Flutter's BackdropFilter widget.

Applies an StacImageFilter to the existing painted content before painting its child. Commonly used to create frosted glass blur effects.

{@tool snippet} Dart Example:

StacBackdropFilter(
  filter: StacImageFilter(type: StacImageFilterType.blur, sigmaX: 10, sigmaY: 10),
  child: StacContainer(color: '#33FFFFFF'),
)

{@end-tool}

{@tool snippet} JSON Example:

{
  "type": "backdropFilter",
  "filter": { "type": "blur", "sigmaX": 10, "sigmaY": 10 },
  "child": { "type": "container", "color": "#33FFFFFF" }
}

{@end-tool}

See also:

  • Flutter's BackdropFilter documentation (https://api.flutter.dev/flutter/widgets/BackdropFilter-class.html)
Inheritance
Available extensions
Annotations
  • @JsonSerializable.new(explicitToJson: true)

Constructors

StacBackdropFilter({required StacImageFilter filter, StacWidget? child, bool? enabled, StacBlendMode? blendMode})
Creates a StacBackdropFilter.
const
StacBackdropFilter.fromJson(Map<String, dynamic> json)
Creates a StacBackdropFilter from JSON.
factory

Properties

blendMode → StacBlendMode?
The blend mode to apply when blending the filter with existing content.
final
child → StacWidget?
The widget painted after applying the filter.
final
enabled → bool?
Whether the filter should be applied.
final
filter → StacImageFilter
The image filter to apply to the painted content behind child.
final
hashCode → int
The hash code for this object.
no setterinherited
jsonData → Map<String, dynamic>?
Raw JSON data for this widget
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
Widget type identifier.
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(BuildContext context) → Widget?

Available on StacWidget?, provided by the StacWidgetParser extension

parsePreferredSizeWidget(BuildContext context) → PreferredSizeWidget?

Available on StacWidget?, provided by the StacWidgetParser extension

Parses a widget for a slot that needs a PreferredSizeWidget, such as a scaffold's appBar or an app bar's bottom.
toJson() → Map<String, dynamic>
Converts this StacBackdropFilter to JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited