Skip to content

Add 1240dp breakpoint to flutter_adaptive_scaffold #118932

Closed

Description

@FelixZY

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.

Activity

  1. added
    in triagePresently being triaged by the triage team
    c: new featureNothing broken; request for a new capability
    packageflutter/packages repository. See also p: labels.
    c: proposalA detailed proposal for a change to Flutter
    and removed
    in triagePresently being triaged by the triage team
    on Jan 23, 2023
  2. added
    P3Issues that are less important to the Flutter project
    on Jan 24, 2023
  3. martijn00 commented on Aug 16, 2024

    @martijn00

    @gspencergoog this can be closed.

  4. github-actions commented on Sep 4, 2024

    @github-actions

    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 -v and a minimal reproduction of the issue.

  5. locked as resolved and limited conversation to collaborators on Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: flutter_adaptive_scaffoldThe flutter_adaptive_scaffold packagepackageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions