Skip to content

Migrate FloatingActionButton to Material 3 - #94486

Merged
fluttergithubbot merged 5 commits into
flutter:masterfrom
darrenaustin:m3_fab
Jan 13, 2022
Merged

fluttergithubbot merged 5 commits into
flutter:masterfrom
darrenaustin:m3_fab

Conversation

@darrenaustin

@darrenaustin darrenaustin commented Dec 1, 2021 •

Copy link
Copy Markdown
Contributor

Part of: #91605

Updated the FloatingActionButton widget with support for Material Design 3.

FAB

In order to use the FloatingActionButton with the new Material 3 defaults, turn on the useMaterial3 flag in the ThemeData:

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

This also adds a new iconSize parameter to the FloatingActionButtonThemeData that allows apps to configure the size used by the icon inside the FAB.

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard Bot added p: material_ui material_ui package in flutter/packages framework flutter/packages/flutter repository. See also f: labels. labels Dec 1, 2021
@google-cla google-cla Bot added the cla: yes label Dec 1, 2021
Comment thread packages/flutter/lib/src/material/floating_action_button.dart Outdated
Comment thread packages/flutter/lib/src/material/floating_action_button.dart Outdated
Comment thread packages/flutter/lib/src/material/floating_action_button.dart Outdated
Comment thread packages/flutter/lib/src/material/floating_action_button.dart Outdated
Comment thread packages/flutter/lib/src/material/floating_action_button.dart Outdated
Comment thread packages/flutter/lib/src/material/floating_action_button.dart Outdated
Comment thread packages/flutter/lib/src/material/floating_action_button.dart Outdated
Comment thread packages/flutter/lib/src/material/floating_action_button.dart Outdated
Comment thread packages/flutter/lib/src/material/floating_action_button.dart Outdated
Comment thread packages/flutter/lib/src/material/floating_action_button.dart Outdated
Comment thread packages/flutter/lib/src/material/floating_action_button.dart Outdated
Comment thread dev/tools/tokens/material-tokens.json Outdated
Comment thread packages/flutter/lib/src/material/floating_action_button.dart Outdated
@flutter-dashboard flutter-dashboard Bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Jan 7, 2022
@darrenaustin
darrenaustin marked this pull request as ready for review January 7, 2022 20:32
Comment thread packages/flutter/test/material/floating_action_button_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.

I think it'd be easy to miss one of these. Consider creating a material 3 theme in setUp or setUpAll

@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.

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

@rami-a rami-a left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread packages/flutter/lib/src/material/floating_action_button.dart Outdated
Comment thread packages/flutter/lib/src/material/floating_action_button.dart Outdated
Comment thread packages/flutter/lib/src/material/floating_action_button_theme.dart Outdated
@skia-gold

Copy link
Copy Markdown

Gold has detected about 3 new digest(s) on patchset 4.
View them at https://flutter-gold.skia.org/cl/github/94486

@skia-gold

Copy link
Copy Markdown

Gold has detected about 3 new digest(s) on patchset 5.
View them at https://flutter-gold.skia.org/cl/github/94486

@HansMuller HansMuller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@fluttergithubbot
fluttergithubbot merged commit 2ab2ca2 into flutter:master Jan 13, 2022
@darrenaustin
darrenaustin deleted the m3_fab branch January 14, 2022 04:21
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jan 18, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jan 18, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jan 18, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Feb 4, 2022
@darrenaustin darrenaustin mentioned this pull request Feb 23, 2022
63 of 70 tasks
@guidezpl guidezpl changed the title Migrate FloatingActionButton to Material 3 Migrate FloatingActionButton to Material 3 May 24, 2022
@guidezpl guidezpl linked an issue May 26, 2022 that may be closed by this pull request
@bernaferrari

Copy link
Copy Markdown
Contributor

Maybe you could deprecate this now that _FloatingActionButtonType.small / floatingActionButtonTheme.smallSizeConstraintsare a reality.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Migrate FloatingActionButton to Material 3

7 participants