Filter class

A builder for creating CSS backdrop filter values.

It is used to create a backdrop filter that is applied to the backdrop of a component.

Example

const filters = Filter()
  ..applyBlur(10)
  ..applyBrightness(50)
  ..applyContrast(50)
  ..applyGrayscale(50)
  ..applyHueRotate(50)
  ..applyInvert(Dim(1.5))
  ..applyOpacity(Dim(0.5))
  ..applySaturation(Dim.percent(50))
  ..applySepia(Dim(0.5));

Constructors

Filter()

Properties

cssText → String
Generates a CSS string by concatenating all the filters.
no setter
hashCode → int
The hash code for this object.
no setteroverride
props → Map<String, String>
Generates a CSS map entry for the filter.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

applyBlur(double value) → Filter
Adds a blur filter effect.
applyBrightness(double value) → Filter
Adds a brightness filter effect.
applyContrast(double value) → Filter
Adds a contrast filter effect.
applyGrayscale(double value) → Filter
Adds a grayscale filter effect.
applyHueRotate(double value) → Filter
Adds a hue-rotate filter effect.
applyInvert(Dim value) → Filter
Adds a invert filter effect.
applyOpacity(Dim value) → Filter
Adds a opacity filter effect.
applySaturation(Dim value) → Filter
Adds a saturation filter effect.
applySepia(Dim value) → Filter
Adds a sepia filter effect.
clear() → Filter
Removes all filters.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

dimBlur → Filter
Dim blur effect.
final
dramaticOverlay → Filter
Dramatic overlay effect.
final
frostedGlass → Filter
Frosted glass effect.
final