Repository navigation
Add 1240dp breakpoint to flutter_adaptive_scaffold #118932
Copy link
Copy link
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: flutter_adaptive_scaffoldThe flutter_adaptive_scaffold packageThe flutter_adaptive_scaffold packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
Description
Use case
I want to switch from a NavigationRail to a NavigationDrawer at 1240 dp width in accordance with documentation:
Standard navigation drawers are best for screens at large breakpoints of 1240dp or greater.
https://m3.material.io/components/navigation-drawer/guidelines
Proposal
Add a new extraLarge breakpoint at 1240 dp to Breakpoints:
// ...
- static const Breakpoint large = WidthPlatformBreakpoint(begin: 840);
+ /// A desktop window whose width is between 840 dp and 1240 dp.
+ static const Breakpoint large = WidthPlatformBreakpoint(begin: 840, end: 1240);
/// A window whose width is greater than 840 dp.
+ static const Breakpoint largeAndUp = WidthPlatformBreakpoint(begin: 840);
- /// A desktop window whose width is greater than 840 dp.
+ /// A desktop window whose width is between 840 dp and 1240 dp.
static const Breakpoint largeDesktop =
- WidthPlatformBreakpoint(begin: 840, platform: _desktop);
+ WidthPlatformBreakpoint(begin: 840, end: 1240, platform: _desktop);
+ /// A window whose width is greater than 1240 dp.
+ static const Breakpoint extraLarge = WidthPlatformBreakpoint(begin: 1240);
+ /// A desktop window whose width is greater than 1240 dp.
+ static const Breakpoint extraLargeDesktop =
+ WidthPlatformBreakpoint(begin: 1240, platform: _desktop);
// ...Notes
I currently work around this using a CustomBreakpoints class. However, since 1240 dp is defined in the design documentation, I think it should be supported out of the box.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: flutter_adaptive_scaffoldThe flutter_adaptive_scaffold packageThe flutter_adaptive_scaffold packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
Activity
[flutter_adaptive_scaffold] Add expanded and extra large breakpoints (#…
martijn00 commentedon Aug 16, 2024
@gspencergoog this can be closed.
github-actions commentedon Sep 4, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.