Should Scaffold be used in every screen (ProfileScreen, HomeScreen, ...) or should it only be used once at the top level with some logic to fit with each screen?
f
Filip Wiesner
01/18/2022, 9:07 AM
Both can work βΊοΈ It's up to you. (I don't know of any limitation that would prefer one way or the other)
c
cb
01/18/2022, 9:12 AM
I prefer to use a Scaffold at the top-level to host the bottom navigation, and then also a nested
Scaffold
in each screen for the top app bar.
The tweaked
Scaffold()
version supplied in Accompanist Insets is actually built for that use-case, as it compounds the content padding which is necessary for inset handling.
π 5
ππ½ 1
today i learned 4
c
Colton Idle
01/18/2022, 12:18 PM
I can vouch for this as well. I have two apps that use bottom nav, and so using a scaffold is handy at the top level for that, but I actually put in a TopAppBar on each screen as it gives me the most flexibility with animations etc