Skip to content

Document backdropFilter edge case #10148

@xster

Description

@xster

Trying to incrementally rebuild https://github.com/xster/ios-flutter-demo to find why the blur filter doesn't work in the finished example.

Found an edge case so far given:

void main() {
  runApp(new MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Demo',
      theme: new ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: new Scaffold(
        body: new Stack(
          children: <Widget>[
            new ListView(children: new List<Widget>.filled(
              10,
              new Padding(
                padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 2.0),
                child: new Card(
                  child: new SizedBox(
                    height: 160.0,
                    child: const Center(child: const Text('blah')),
                  )
                ),
              )
            )),
            new BackdropFilter(
              filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
              child: new Container(
                height: 60.0,
                decoration: const BoxDecoration(
                  color: const Color(0xAAF7F7F7),
                  border: const Border(
                    bottom: const BorderSide(color: const Color(0xAAEEEEEE)),
                  ),
                ),
                // child: const Center(child: const Text('Title')),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

Uncommenting the child in the BackdropFilter's Container somehow blurs the entire page rather than the area in the box constraints of the BackdropFilter's child.

Metadata

Metadata

Assignees

No one assigned

    Labels

    d: api docsIssues with https://api.flutter.dev/frameworkflutter/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