Skip to content

Update NavigationRail to support Material 3 tokens - #99171

Merged
darrenaustin merged 4 commits into
flutter:masterfrom
darrenaustin:m3_navigation_rail
Mar 10, 2022
Merged

darrenaustin merged 4 commits into
flutter:masterfrom
darrenaustin:m3_navigation_rail

Conversation

@darrenaustin

@darrenaustin darrenaustin commented Feb 25, 2022 •

Copy link
Copy Markdown
Contributor

Part of: #91605

Updated NavigationRail widget to support Material Design 3 tokens.

NavRail-M3

In order to not break anyone currently using this widget, the new support is gated by ThemeData.useMaterial3 flag. To use the NavigationRail with the Material 3 token defaults, turn on the useMaterial3 flag in the ThemeData:

  return MaterialApp(
    theme: ThemeData(useMaterial3: true),
    // ...
  );

This also adds new minWidth and minExtendedWidth parameters to the NavigationRailThemeData.

@flutter-dashboard flutter-dashboard Bot added a: text input Entering text in a text field or keyboard related problems p: material_ui material_ui package in flutter/packages framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels Feb 25, 2022
@darrenaustin darrenaustin changed the title Migrate NavigationRail to Material 3 Migrate NavigationRail to Material 3. Feb 28, 2022
@darrenaustin
darrenaustin marked this pull request as ready for review March 3, 2022 00:21
Comment thread packages/flutter/lib/src/material/navigation_rail.dart Outdated
Comment thread packages/flutter/lib/src/material/navigation_rail.dart Outdated
Comment thread packages/flutter/lib/src/material/navigation_rail.dart Outdated
Comment thread packages/flutter/test/material/navigation_rail_test.dart Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be tokens available for these colors and shapes

@guidezpl guidezpl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  _    ___ _____ __  __ 
 | |  / __|_   _|  \/  |
 | |_| (_ | | | | |\/| |
 |____\___| |_| |_|  |_|
                        

@guidezpl guidezpl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great to add a sample with useMaterial3 enabled

@darrenaustin
darrenaustin merged commit 57aa490 into flutter:master Mar 10, 2022
@darrenaustin
darrenaustin deleted the m3_navigation_rail branch March 10, 2022 00:01
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 10, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 10, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 10, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 10, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 10, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2022
@darrenaustin darrenaustin mentioned this pull request Mar 17, 2022
63 of 70 tasks
@guidezpl guidezpl changed the title Migrate NavigationRail to Material 3. Update NavigationRail to support Material 3 tokens Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: text input Entering text in a text field or keyboard related problems c: contributor-productivity Team-specific productivity, code health, technical debt. framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants