-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat: variable front page height #73
feat: variable front page height #73
Conversation
@daadu Sorry for the delay! Let me know what you think of these changes and I can add the documentation changes discussed in the linked issue. |
@mockturtl what's the purpose of setting Wasn't your original issue #70 about the front layer that should fill exactly the height of its content? |
I agree it would be nice if Material provided more guidance here. I can't cite any use cases of Backdrop outside the "Material studies" apps. (Mine is functionally equivalent to a drawer, as in Shrine.) Side note, I do think a "fractional" parameter is more user-friendly than a pixel value.
That's arguably a nicer API. Can we make it work? I get layout flicker when I naively wrap the front layer with I would guess |
@WieFel #70 as I see, is about having "extra" drop by-default if a user wants, instead of sticking to appbar by default. I think What you are suggesting |
Ok, so please go ahead with it @mockturtl @daadu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor documentation changes and a minor refactor requested.
@WieFel Can you review it too? |
Co-authored-by: Harsh Bhikadia <[email protected]>
abcd5c4
to
d50f5be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mockturtl has the implementation been tested against common use-cases? It should not break any previously working functionality...
2f1eff3
to
6cdd29d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mockturtl We have a "demo" app that show cases various use-cases of backdrop implemented with the package check live demo. Feel free to add a use-case using this feature if you want in future.
Apart from that this LGTM.
This has landed with v0.5.0 on pub.dev. @mockturtl Thanks for your contribution. Please check yourself in README!! |
Adds
double frontLayerActiveFactor
toBackdropScaffold
. See #70.Optional: use
drawerScrimColor
to disable the back layer when it is partially concealed.Default values leave existing behavior unchanged
New behavior
drawerScrimColor: Colors.black54
,frontLayerActiveFactor: 0.2
(20% height)drawerScrimColor: Colors.black54
,frontLayerActiveFactor: 0.5
(50% height)