Let’s talk about responsive layout navigations on different media sizes in #FlutterDev. What features do you like to use? In this thread I show some common ones that I often use 😃💙 🧵⬇️
2
Going from a phone bottom navigation to a navigation rail on tablet sizes, is a given basic feature of a responsive design and media size responsive navigation. ⬇️
0:22
3
I also like to offer the capability to hide/show even the nav rail, so the user can maximize the content area also on tablet sized media, if so desired. ⬇️
0:13
4
When we move into media size where a side menu makes sense, if this a variable size UI, I like the menu transition to animate. This makes the user experience more fluid and nicer. ⬇️
0:10
5
Again it is nice to offer the capability to cycle from menu to rail, to a totally hidden menu and shown again also on larger media, so the user can maximize content area when so desired. ⬇️
0:08
6
In a nav bar and side menu, you can show less important destinations and even tap commands in them, but they will not fit in a bottom nav, that imo should have max 5 destinations. In my flexible responsive scaffold they appear in a classic drawer menu if and when used. ⬇️
0:21
7
If you with rail or side menu navigate to an extra destination, e.g. Settings and then resize to mobile size, how can you get to main destinations if you do not restore size? Bring all destinations to the drawer!?🤷♂️🙂
On mobile the extra drawer destinations are pushed on top. ⬇️
0:46
8
For some destinations you may want a sidebar with additional controls, eg filters. If used, appearance animations are key to make the menu transition feel fluid on resizable media. While a sidebar works on mobile, bottom sheets are more trendy and can replace it on mobile. ⬇️
0:42
9
With bottom nav and bottom sheet combo, how do you indicate there is a sheet? A bar on a bottom nav or an extra button do not look nice. Maybe keep the top button? Open bottom sheet from there and on first use tell user they can also swipe from bottom nav to open it? Thoughts? ⬇️
10
Content needs to be media size responsive too, here a grid demo. Often content also need a master-detail view, preferably with animated transition. Currently my scaffold does not deal with the content, only navigation and sidebar, but should it have a master-detail built-in? ⬇️
0:32
11
Setup of destinations for the responsive scaffold above, that handles sizes from phone to tablet and desktop, with transition animations, is similar to defining a bottom nav, rail or navigation menu destinations. This is easy, but it only does the menus. Navigation is tricky💙 ⬇️
12
What makes navigation complicated is that we want different transitions on different media sizes and also nested navigation under main destinations, as well as a shell navigator and none transitioning side menu, even if the content may have transition animation. Options? ⬇️
13
This demo was made with GoRouter, using TypedGoRoutes and TypedStatefulShellRoute with TypedStatefulShellBranch and StatefulShellRouteData. Totally 500 LoC of code for codegen setup of route defs, generating another 500 LoC. Not trivial, but needed for web and type safe nav. ⬇️
14
These were some features I find useful in my responsive Scaffold and navigation. I use it to setup a responsive frame that works well from phone, to tablet and desktop media sizes for typical business apps that should work on all #FlutterDev platforms. How do you handle it all?😃
15
One more thing, yes this demo also uses #FlexColorScheme I just did not show that as it was not the topic🙂It hides advanced UI customization behind a toggle in Settings. If enabled you can go almost as nuts as you want the options 😂💙
2:13
Save this thread — create a free accountSave this thread