Skip to content
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

[Question/Feature Request] Use This Effect on a Widget? #57

Open
seanocali opened this issue Jan 24, 2023 · 2 comments
Open

[Question/Feature Request] Use This Effect on a Widget? #57

seanocali opened this issue Jan 24, 2023 · 2 comments

Comments

@seanocali
Copy link

Instead of applying the effect on the app's window, can it be used as the background color of a Container?

@Adrian-Samoticha
Copy link
Collaborator

It can be on macOS using the TransparentMacOSSidebar, TransparentMacOSBottomBar, or VisualEffectSubviewContainer widgets. There is no way to do so on Linux or Windows.

@alexmercerind
Copy link
Owner

You can "clip out" a section from your widget tree & remove Flutter paint from that region. It will make Flutter use window's background in that region. Do it using CustomPainter, just use BlendMode.clear. See:

https://github.com/alexmercerind/flutter_native_view/blob/master/lib/src/widgets.dart#L145-L160

This is only solution for Windows & Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants