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

Some Child Widgets Not Blurred #16

Open
hyped0001 opened this issue Oct 5, 2024 · 5 comments
Open

Some Child Widgets Not Blurred #16

hyped0001 opened this issue Oct 5, 2024 · 5 comments
Assignees

Comments

@hyped0001
Copy link

Simulator Screen Recording - iPhone 15 Pro - 2024-10-05 at 17 15 04

@hyped0001
Copy link
Author

hyped0001 commented Oct 5, 2024

SoftEdgeBlur(
            edges: [
              EdgeBlur(
                type: EdgeType.topEdge,
                size: 122,
                sigma: 150,
                tintColor: Colors.white.withValues(alpha: 0.20),
                controlPoints: [
                  ControlPoint(
                    position: 0.8,
                    type: ControlPointType.visible,
                  ),
                  ControlPoint(
                    position: 1.0,
                    type: ControlPointType.transparent,
                  ),
                ],
              )
            ],
            child: CustomScrollView(children: [...widgets here],),);

@damywise
Copy link

I'm not sure if this is the same problem, but I'm facing a similar issue to BackdropFilter, where some widgets behind are not getting blurred properly when I use Blendmode.srcOver. However, it works fine when I switch to Blendmode.src. The only thing is, I can't find the blendmode option in this package.

@Rahiche
Copy link
Owner

Rahiche commented Oct 15, 2024

This widget does not take everything behind the child like BDF it just takes the content child
So if you have red background and list view on top of it, using BDF will see whole thing, from the red content to the list view content

This package only sees the content of the child and blurs that content only
So try to use this widget one level above to make sure the content that is not blurred is inside SoftEdgeBlur and not behind it

instead of :

-> Container(color: Colors.red)
--> SoftEdgeBlur 
---> ListView

Do:

-> SoftEdgeBlur 
--> Container(color: Colors.red)
---> ListView

Let me know if that helps @damywise and and @hyped0001

@Rahiche Rahiche self-assigned this Oct 15, 2024
@hyped0001
Copy link
Author

We have a pretty large tree of widgets, is it possible to blur the children as well? Or would that be too heavy?

@Rahiche
Copy link
Owner

Rahiche commented Oct 15, 2024

Yes, it is possible

The blurring will be done in the same amount of time, because you are blurring the same rectangular area
but for the part where the widget tree is turned into an image using AnimatedSampler I don't know exactly how big of a difference it will be.

but I advise you try it and test in few different devices to come up with your own results

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