Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load BreakPoint Specific UI #56

Open
maheshj01 opened this issue Jul 20, 2024 · 0 comments
Open

Load BreakPoint Specific UI #56

maheshj01 opened this issue Jul 20, 2024 · 0 comments
Labels
Feature Request New feature or request P3 Low priority (default) for the features/bugs that will be worked on in near future

Comments

@maheshj01
Copy link
Owner

maheshj01 commented Jul 20, 2024

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.

@maheshj01 maheshj01 added Feature Request New feature or request P3 Low priority (default) for the features/bugs that will be worked on in near future labels Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request P3 Low priority (default) for the features/bugs that will be worked on in near future
Projects
None yet
Development

No branches or pull requests

1 participant