filter property

  1. @Deprecated('Use filterConfig instead. ' 'This feature was deprecated after v3.40.0-1.0.pre.')
ImageFilter get filter

The image filter to apply to the existing painted content.

For example, consider using ui.ImageFilter.blur to create a backdrop blur effect.

The filter property is equivalent to filterConfig (with the help of the ImageFilterConfig.new constructor), except for features only supported by ImageFilterConfig (such as the bounds parameter in ImageFilterConfig.blur).

Assigning a filter via this setter will overwrite any existing filterConfig.

This getter should only be called when the filter is assigned via the filter setter, otherwise it will throw an assertion error.

Implementation

@Deprecated(
  'Use filterConfig instead. '
  'This feature was deprecated after v3.40.0-1.0.pre.',
)
ui.ImageFilter get filter {
  assert(
    filterConfig.filter != null,
    'This getter should only be called when the filter is assigned via the `filter` setter.',
  );
  return filterConfig.filter!;
}
set filter (ImageFilter value)

Implementation

set filter(ui.ImageFilter value) {
  filterConfig = ImageFilterConfig(value);
}