Skip to content

Framework uses of BackdropFilter should consider using BlendMode.src #81322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
flar opened this issue Apr 27, 2021 · 1 comment
Open

Framework uses of BackdropFilter should consider using BlendMode.src #81322

flar opened this issue Apr 27, 2021 · 1 comment
Labels
f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. P2 Important issues not at the top of the work list team-design Owned by Design Languages team triaged-design Triaged by Design Languages team

Comments

@flar
Copy link
Contributor

flar commented Apr 27, 2021

After landing both flutter/engine#19631 and #80129 it is now possible for the BackdropFilter to specify the blend mode with which to apply its filtered version of the background onto the existing background.

The default value was kept at BlendMode.srcOver for backwards compatibility, but most cases should be able to use BlendMode.src without any complications. If any internal uses of BackdropFilter might be nested inside an Opacity widget by the developer, then they should specify the BlendMode.src mode so as not to cause surprising results when, for example, the widget ends up inside a fade-transitioning dialog.

Some discussion of where this can impact developers using the Cupertino widgets can be found in #31706

@flar
Copy link
Contributor Author

flar commented Apr 27, 2021

A quick grep of BackdropFilter shows the following potential list of places where the Framework uses BackdropFilter. I pared it down as the the grep returned a lot of false positives from our tests and benchmarks, so this list should be taken with a grain of salt and not considered exhaustive.

packages/flutter/lib/src/cupertino/bottom_tab_bar.dart:        child: BackdropFilter(
packages/flutter/lib/src/cupertino/dialog.dart:      child: BackdropFilter(
packages/flutter/lib/src/cupertino/dialog.dart:          child: BackdropFilter(
packages/flutter/lib/src/cupertino/nav_bar.dart:/// is opaque. Otherwise, also blur with [BackdropFilter].
packages/flutter/lib/src/cupertino/nav_bar.dart:    child: BackdropFilter(
packages/flutter/lib/src/material/flexible_space_bar.dart:              child: BackdropFilter(
packages/flutter/lib/src/widgets/routes.dart:      barrier = BackdropFilter(

@darshankawar darshankawar added in triage Presently being triaged by the triage team f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. passed first triage f: cupertino flutter/packages/flutter/cupertino repository and removed in triage Presently being triaged by the triage team labels Apr 28, 2021
@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-design Owned by Design Languages team triaged-design Triaged by Design Languages team labels Jul 8, 2023
@Piinks Piinks added the P2 Important issues not at the top of the work list label May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. P2 Important issues not at the top of the work list team-design Owned by Design Languages team triaged-design Triaged by Design Languages team
Projects
None yet
Development

No branches or pull requests

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy