-
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
allow variable height front pages #70
Comments
@mockturtl Have you tried |
[1] This is my use case: my back layer is a large menu. Apologies for misrepresenting that in the screenshot above.
[2] It might be desirable to document the control flow inside the From what I can tell, the existing constructor args for @willlarche Does Material have an opinion on a Backdrop with variable-height front layers? I'll double check Crane. |
@mockturtl Thanks for pointing out problem in Regarding your requirement, as far as I understand(from checking Crane example), you want to have "extra" space under appbar, that is visible even when the A solution for that would be to set MaterialApp(
title: 'Backdrop Demo',
home: BackdropScaffold(
appBar: BackdropAppBar(
title: Text("Backdrop Example"),
actions: <Widget>[
BackdropToggleButton(
icon: AnimatedIcons.list_view,
)
],
bottom: PreferredSize(
child: Column(
children: [
Text("Menu 1"),
Text("Menu 2"),
],
),
preferredSize: Size.fromHeight(100),
),
),
backLayer: Center(
child: Text("Back Layer"),
),
subHeader: BackdropSubHeader(
title: Text("Sub Header"),
),
frontLayer: Center(
child: Text("Front Layer"),
),
),
); As far as I understand, the "extra" (always visible stuff) should be part of AppBar and not backLayer (which is revealed and concealed) |
@mockturtl Hi! So wonderful to see this implementation. Much thanks to everyone working on expanding Material coverage in the community. We have no issue with that! Go for it! |
Not really. I want the front layer's height to be configurable for each page. I'm not sure how to explain differently. I'm happy to submit a PR if you think the idea makes sense. Back layer and appbar look goodFront layer: Current behaviorFront layer: Desired behavior |
@mockturtl Ok, got your point. Go ahead with the PR! BTW, what should we name the param? Any idea? Few of my suggestions:
Also while filing PR can you correct the docs for |
This has landed with v0.5.0 on pub.dev. |
Is your feature request related to a problem? Please describe.
My first front page is a large form. It displays well.
My second front page is mostly empty:
I'd like to provide a target height for this page, so it expands to a more appropriate size for its content.
Describe the solution you'd like
I can get my desired behavior by adjusting the
top
param of theend
rectangle in_getPanelAnimation
.Could we expose a variable for this?
Describe alternatives you've considered
I haven't explored how this will interact with the other
BackdropScaffold
constructor args.Maybe
PreferredSizeWidget
is a useful way to convey the behavior?Additional context
The Material spec doesn't address whether front pages should have a consistent height.
The text was updated successfully, but these errors were encountered: