Comments (7)
@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!
from backdrop.
@mockturtl Have you tried stickyFrontLayer
and headerHeight
arguments of BackdropScaffold
, to get desired UI?
from backdrop.
@mockturtl Ok, got your point. Go ahead with the PR! BTW, what should we name the param? Any idea?
Few of my suggestions:
double frontLayerStartFrom: 0
double frontLayerTopMargin: 0
- ??
Also while filing PR can you correct the docs for headerHeight
- instead of using "closed" and "open" term (earlier we used them), use phrases like "when backLayer
is concealed/revealed", that should avoid the confusion with the usage of `headerHeight.
from backdrop.
This has landed with v0.5.0 on pub.dev.
from backdrop.
- Playing with values in
example/lib/navigation.dart
, my understanding of thestickyFrontLayer
behavior is "When closed, the front layer will occupy as much height as possible without occluding the back layer. If the back layer occupies the entire screen height[1], this parameter has no effect."
[1] This is my use case: my back layer is a large menu. Apologies for misrepresenting that in the screenshot above.
headerHeight
seems to control the height of the front layer in its inactive / closed state (this contradicts my reading of the docs[2]). Additionally, ifstickyFrontLayer == true
andheaderHeight
is less than the available space,headerHeight
is ignored.
[2] It might be desirable to document the control flow inside the _headerHeight
getter and _getPanelAnimation
, if it's not too cumbersome to explain.
From what I can tell, the existing constructor args for BackdropScaffold
don't allow me to specify "front page A opens to height X, front page B opens to height Y."
@willlarche Does Material have an opinion on a Backdrop with variable-height front layers? I'll double check Crane.
from backdrop.
@mockturtl Thanks for pointing out problem in headerHeight
docs, will correct it.
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 backLayer
is concealed.
A solution for that would be to set bottom
of BackdropAppBar
. Check the following code (modified example/main.dart):
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)
from backdrop.
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 backLayer is concealed
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 good
Front layer: Current behavior
Front layer: Desired behavior
from backdrop.
Related Issues (20)
- Merge example and demo project HOT 5
- Abstract out "backdrop core" from `BackdropScaffold`
- Add a shadow to the front layer
- Custom shape on the front layer HOT 7
- How to show back layer without scrim on front? HOT 5
- Slivers AppBar HOT 7
- cannot paste if backdrop is revealed HOT 6
- I can't get edge swipe to go back to work with BackdropScaffold. Any helpful tips? HOT 1
- flutter beta: SchedulerBinding is now null-safe HOT 2
- BoxShadow on front layer HOT 3
- Backdrop is not compiling after upgrading to Flutter 3.10 HOT 2
- En Flutter 3.10 no compila Por 2 Lineas en el Widget AppBar (brightness y textTheme), las cuales estan en desuso pero el compilador las toma en cuenta, eliminando esas 2 lines el paquete funciona perfectamente HOT 3
- Variable to know if back layer is expanded or collapsed HOT 1
- Manually opening Backdrop HOT 9
- Pressing Back button cause visible frontLayer HOT 10
- Reveal backlayer with natural gestures HOT 1
- Make a parameter out of front layer elevation HOT 6
- BackdropScaffold usage gif example needs an update! HOT 1
- Avoid SubHeader spawn on top of Front Layer HOT 2
- Use AppBar.SystemOverlayStyle instead of AppBar.Brightness HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from backdrop.