ImageFilterConfig class abstract

A description of an image filter that can adapt to the layout of its target.

Use ImageFilterConfig to define visual effects that depend on the size, position, or other layout attributes of a widget or render object.

Unlike ui.ImageFilter, which is an engine-level object with static parameters, ImageFilterConfig acts as a framework-level blueprint. It delays the creation of the actual filter until the painting phase, where it is resolved into a ui.ImageFilter using an ImageFilterContext.

This resolution process allows filters to use layout information as parameters. For example, a filter can use the Rect bounds provided by the context to restrict its sampling area to the object's boundaries.

Most layout-independent filters can be wrapped using the default constructor. For effects that require layout information, such as a "bounded" blur, use the specialized constructors.

See also:

Annotations

Constructors

ImageFilterConfig(ImageFilter filter)
Creates a configuration that directly wraps an existing ui.ImageFilter.
const
factory
ImageFilterConfig.blur({double sigmaX, double sigmaY, TileMode tileMode, bool bounded})
Creates a configuration for a Gaussian blur.
const
factory
ImageFilterConfig.compose({required ImageFilterConfig outer, required ImageFilterConfig inner})
Composes the inner filter configuration with outer, to combine their effects.
const
factory

Properties

debugShortDescription String
The description text to show when the filter is part of a composite ImageFilterConfig created using ImageFilterConfig.compose.
no setter
filter ImageFilter?
The underlying ui.ImageFilter if this configuration was created by wrapping an existing filter.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(ImageFilterContext context) ImageFilter
Resolves this configuration into a ui.ImageFilter, given the context of the widget applying the filter.
toString() String
A string representation of this object.
override

Operators

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