-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
MacosScaffold's main content area not scrolling under the blurring Toolbar #321
Comments
Hi @ricard-v, thanks for filing this issue. The Toolbars and scrolling in the App Store seem to behave slightly differently in various places, and are reminiscent of Flutter's Since the @whiplashoo, any thoughts on this? |
@GroovinChip Indeed, since we need to keep the original |
Excellent, thank you for confirming. |
Description
Not really sure if it is a feature request but after reading the source code I am inclined to believe it might be an omission.
Anyway, looking at some native MacOS Apps, such as the actual AppStore, the navigation bar allows for content to scroll under while applying the well-known blurring translucency:
How to reproduce the same effect using this
macos_ui
package?I started to dig in the source code of the
Toolbar
widget that can be supplied to theMacosScaffold
and I did find the logic where the background is blurred:Source code (shortened and simplified)
Then I moved on to the source code of
MacosScaffold
. Unsurpringly, the various parts (toolbar, children), are laid out in aStack
.But there is something that looks maybe wrong: if a
Toolbar
is defined, then a top padding based on theToolbar
's height is applied to the body part of theMacosScaffold
which causes the body to be placed under the toolbar:In order to have the translucency I am looking for, I have to remove this top padding so that the my main content starts drawing under the
Toolbar
and I have to set a background color with some opacity that I decided to set at0.9
:But I have trouble getting the same effect as the AppStore...
Strangely, If I dot not ouch the source code and apply a completely transparent background color to my
Toolbar
there is a little of blurring:(zoomed screenshot)

So, in conclusion, I believe it was meant for the
Toolbar
to have the translucent blurring background however, I don't know how I should get it working using the package as-is. I am not that well knowledgeable in Flutter, but I believe a way would be so that theContentArea
provides a safe area to draw content taking into account theToolbar
's height much like the Cupertino widgets does it for theTabBar
.Logs
Flutter doctor
The text was updated successfully, but these errors were encountered: