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
Add migration guide for Material 3 #10076
Conversation
`useMaterial3` to `false`. However, this is just a temporary solution. The | ||
`useMaterial3` flag _and_ the Material 2 implementation will eventually be | ||
removed as part of Flutter’s deprecation policy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HansMuller
This was written before your comment. Is this still accurate?
If you have any suggestions on updating this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not Hans, but my understanding is that this is still true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is still true. Before we deprecate M2 we'll provide a theme, in a separate public package, that closely approximates the M2 defaults.
Visit the preview URL for this PR (updated for commit f206ad2): https://flutter-docs-prod--pr10076-m3-migration-guide-m69kcbls.web.app |
bb4a407
to
8e0062d
Compare
@parlough |
Thanks so much for working on this @TahaTesser! This will be an extremely useful reference for developers completing the migration. I'm excited to read it too :D
Good question! Despite the name, However, we can link to it from elsewhere as well to increase discoverability. I'd likely link to it from the Material Design for Flutter page where it discusses the transition, the Flutter 3.16 section of Breaking changes and migration guides, perhaps in the sidenav directly under "Material design", and wherever else you think would be helpful. Shams might have some opinions as well :) I'd also consider adding a short redirect link in the |
Yes, I want this added to breaking changes and linked to from the Material page. I've already reviewed it as a Google Doc, but will review it as a PR, too. :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great PR, @TahaTesser! I do have some fairly minor grammatical edits. Also:
- Move this new file to https://docs.flutter.dev/release/breaking-changes
- Add this guide to the index file in that directory under the "3.16 release".
- Add a prominent link to this file from the https://docs.flutter.dev/ui/widgets/material
- Add a shortcut to the firebase.json file (as suggested by Parker)
- Add it to the sidenav (src/data/sidenav.yml) so that it appears under Material (as suggested by Parker)
`useMaterial3` to `false`. However, this is just a temporary solution. The | ||
`useMaterial3` flag _and_ the Material 2 implementation will eventually be | ||
removed as part of Flutter’s deprecation policy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not Hans, but my understanding is that this is still true.
f17ad08
to
d8588f0
Compare
d8588f0
to
66f9e56
Compare
@parlough |
/gcbrun |
I'm trying the build again, as the log error is weird |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @TahaTesser! A few comments with the fix for the build failure and some suggestions to consider:
Thanks for the suggestions! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making those adjustments @TahaTesser!
I just did a quick scan as it sounds like others reviewed the content, but looks good to me overall. Do wait for a final approval from @sfshaza2 though :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please wait for @sfshaza2's LGTM
setting the `useMaterial3` flag to true. As of the Flutter 3.16 release | ||
(November 2023), `useMaterial3` is true by default. | ||
|
||
By the way, you _can_ recapture Material 2 behavior in your app by setting the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: suggest "revert to Material 2" to make this more easily understood by ESL developers.
`ColorScheme.surfaceTint` indicates an elevated widget. | ||
Some widgets use different colors. | ||
|
||
To return your app’s UI to its previous behavior (which we don't particularly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop the 'particularly' as overly complex.
indicate elevation (for example, `Card` and `ElevatedButton`) and others might | ||
only use `surfaceTint` to indicate elevation (such as `AppBar`). | ||
|
||
If you must return to a widget’s previous behavior, set, set `Colors.transparent` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest: 'To return to the widget's previous behavior'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I said "must" is that this page spends a lot of time telling folks how to return to previous behavior, but we really don't want to encourage that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! Thanks for this herculean effort, @TahaTesser!
Wouldn't have been possible without you @sfshaza2 & @parlough 💙 |
Fixes [Create a migration guide for Material 3](flutter/flutter#119319)
Fixes [Create a migration guide for Material 3](flutter/flutter#119319)
Fixes Create a migration guide for Material 3