-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Description
Making Material 3 the default is the last big step in our long (long) transition from Material 2 to Material 3. Currently apps must opt-in to Material 3 with the useMaterial3
flag that appears in all of the ThemeData factory constructors.
return MaterialApp(
theme: ThemeData(useMaterial3: true),
// ...
);
Once this issue has been resolved, useMaterial3: true
will be the default. It will still be possible to configure applications for Material 2 by specifying useMaterial3: false
.
Once this change has landed in a stable release, the useMaterial3
flag will be deprecated and eventually removed per Flutter's deprecation policy.
#129724 Exists to ensure that the the Flutter repo doesn't regress. There's a similar CL for Google internal tests: cl/543770414.
Step 1 - All tests pass when useMaterial3
is true by default
Tests that do not pass when useMaterial is temporarily set to true by default in theme_data.dart (roughly line #442) will either be split into a pair of tests, one that specifies M3 and one that specifies M2, or a single provisional test that specifies M2. For the latter, the test should be added to Step 3 below.
- Dev, examples/api, etc updated for Material 3 by default #129683
- Update golden tests #128914
- Update golden tests for material #128839
- Update tests in material library for Material 3 by default #128300
- Update misc tests for Material3 #128712
- Update unit tests in material library for Material 3 #128725
- Update rest of the unit tests in material library for Material 3 #128747
- Update button tests for Material 3 by default #128628
- Updated material button theme tests for Material3 #128543
- Updated flutter_localizations tests for Material3; #128521
- Use Material3 in the 2D viewport tests #128155
- Updated TabBar and ToggleButtons examples #128088
- Updated Menu examples #128080
- Updated custom ListTile examples #128071
- Updated InputDecoratorExamples for M3 #128065
- Revised Floating Action Button examples #128058
- Update tests in material library for Material 3 by default #128300
- Updated chip_test.dart tests for M3 #129570
- Updated dashboard: wired down Material2 dependency cocoon#2837
- Updated widget_test and enhanced_composited_transform_test: wired down Material2 dependency fzyzcjy/flutter_portal#103
- Update one floating cursor test for the M3 default transition superlistapp/super_editor#1173
- Updated dashboard/test/widgets tests to handle useMaterial3:true by default cocoon#2846
- Updated rfw/test/material_widgets_test.dart for M3 packages#4316
Step 2 - ThemeData useMaterial3
is true by default
- Change the default for
ThemeData.useMaterial3
to true #129724 - Updated
ThemeData.useMaterial3
API doc, default istrue
#130764
Step 3 - Add M2 and M3-specific tests
-- The remaining work for Step 3 has been moved to #139076 --
Tests that were modified with useMaterial3: false
will likely need an M3 version. Examples that were modified with useMaterial3: false
should be updated (along with their tests) to M3.
A list of all the test files that are likely to need to be updated can be found in the M2-M3 Updates TODO spreadsheet.