navbar_router
navbar_router copied to clipboard
Load BreakPoint Specific UI
Right now we only expose a boolean to determine whether we would like to switch to DesktopMode, Provided that there are devices of multiple viewport size we should expose a way to provide users with a breakpoint and build layouts for those viewports
So that the API can be easily used something like this
NavbarRouter(
breakpoints: {
xs: '320px',
sm: '375px',
md: '768px', // width >= 768
lg: '1024px',
xl: '1280px',
2xl: '1536px',
},
builder: (context, dimension){
switch(dimension){
case: dimensions.width >= 320 :
return ExtraSmallUI();
case: dimensions.width >= 375 :
return SmallUI();
case: dimensions.width >= 425 :
return SmallUI();
case: dimensions.width >= 768 :
return LargeUI();
}
}
)
The UI will rebuild when the dimension changes
The desktopMode should be deprecated after this and NavigationRail should be rendered on devices above md.