Skip to content

ImageFilter widget #13489

@MichaelRFairhurst

Description

@MichaelRFairhurst

I want to implement a blur, not of the layer below my widget, but of a current widget.

Is there a widget that looks something like:

build() =>
  new FilteredWidget(
    filter: new ImageFilter.blur(...),
    child: ...
  );

or should I copy RenderProxy from https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/rendering/proxy_box.dart to create one?

I also want to stack these layers, which I'm assuming requires compositing:

build() =>
  new Stack(
    children: [
      new FilteredWidget(
        filter: new ImageFilter.blur(...),
        child: ...
      ),
      new FilteredWidget(
        filter: new ImageFilter.blur(...),
        child: ...
      ),
      ...
  );

They will be blurred different amounts, so while I can use BackdropFilter, I have to order the most blurred before the least blurred, and calculate the proper blur amount to do on the first one such that blurring the second one results in the desired actual blur amount on the first. Would be much better to treat each widget as a blurred widget and composite them, than to treat each widget as blurring its prior paint.

Not sure if solving the first one gets me the second one for free, or if they are separate issues.

Metadata

Metadata

Assignees

Labels

c: new featureNothing broken; request for a new capabilityframeworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions