Comments (13)
@WieFel I would suggest going with subHeader
attribute to BackdropScaffold
instead of BackdropSubHeaderFrontLayer
widget - primarily because of handling stickyFrontLayer
when subHeader
is presents. MDG mandates that the subHeader should be visible. Also because sub-header is MDG is defined as main component (although optional) of the Backdrop Anatomy.
I would suggest:
- add
final Widget subHeader;
as attribute toBackdropScaffold
- modify
_buildFrontPanel
method to accommodate it. - wrap
widget.subHeader
withDefaultTextStyle
as mentioned in MDG for subHeader. So for user simply settingText("Sub Header")
should do the work and off course he can then modify it if it wants. This is how it works in sayAppBar
- where settingtitle
with simpleText
widget does the magic. - handle
stickyFrontLayer
make sure the height of thesubHeader
widget is atleast visible - for eg. If BackLayer has full screen content then thefrontLayer
should drop completely (which would happen in current version) but withsubHeader
visible. We would need to internally pass thekey
to subHeader Widget, to calculate its height.
Moreover, we could provide a helper widget (Like ListTile
in ListView
) say BackdropSubHeader
which can be simply dropped in as subHeader
if user wants standard implementation with additional options like (apart from title
)
bool showDivider
Color dividerColor
double dividerHeight
bool automaticallyImplyLeading
(used to showIcon
to show upward arrow whenbackLayer
is visible asleading
and not visible whenfrontLayer
is visible, also shouldfling
when clicked on it [Check MDG], default:true
)bool automaticallyImplyTrailing
(used to showIcon
to show upward arrow whenbackLayer
is visible astrailing
and not visible whenfrontLayer
is visible, also shouldfling
when clicked on it [Check MDG], default:false
)Widget leading
Widget trailing
BackdropSubHeader
would be recommended way to add subHeader
to Backdrop.
Let me know your thoughts @WieFel @felixwortmann
from backdrop.
I think subHeader
attribute is better given that it is of type Widget
so that it is customisable enough but also default TextStyle
and Padding
from backdrop.
I will be working on this weekend.
from backdrop.
It was originally planned. But I don't know what is the best way to implement this. Do you have any idea?
Also @WieFel what do you think about it?
from backdrop.
Should it be an attribute (say Widget subHeader
) in BackdropScaffold
? or Should we make another widget (say BackdropSubHeaderFrontLayer
) which can be dropped in as frontLayer
(As we did this with BackdropNavigationBackLayer
).
@felixwortmann @WieFel Let me know your views.
from backdrop.
I think just a widget (SubHeader) would be good. I did not read the code where this has to be added - so I can not say which would be easier to implement.
from backdrop.
Also with stickyFrontLayer
we need to make sure that the subHeader
is visible when backLayer
is active
from backdrop.
It was originally planned. But I don't know what is the best way to implement this. Do you have any idea?
Also @WieFel what do you think about it?
I did not read all the code so I also do not know the best way. This might help though: https://medium.com/@CORDEA/implement-backdrop-with-flutter-73b4c61b1357
from backdrop.
I think it is already possible to implement it with the package as it is right now. Front layers would have to consist of a Column
that contains the subheader and the front layer content.
Another way would be to add a BackdropSubHeaderFrontLayer
, as @daadu already mentioned. I think it could look like this:
BackdropSubHeaderFrontLayer(
header: ...,
body: ...,
)
Where header
and body
would be of type widget.
from backdrop.
I just wrote a litttle POC for myself. It only shows the SubHeader when the FrontPanel is closed. You can take a look here - you can just run the example and close the backdrop
from backdrop.
Sounds good
from backdrop.
@daadu Yes, sounds good! :)
from backdrop.
@WieFel @felixwortmann I have written this feature. Please test and give me your feedback.
BackdropSubHeader
is undocumented. I need your help for this!
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.