Skip to content

Commit d261411

Browse files
Remove redundant useMaterial3: true (#163376)
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> This PR removes redundant useMaterial3: true as described in flutter/flutter#162818 *List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.* - flutter/flutter#162818 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
1 parent bffef7a commit d261411

File tree

227 files changed

+464
-898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+464
-898
lines changed

dev/benchmarks/complex_layout/lib/src/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ComplexLayoutAppState extends State<ComplexLayoutApp> {
2323
@override
2424
Widget build(BuildContext context) {
2525
return MaterialApp(
26-
theme: lightTheme ? ThemeData.light() : ThemeData.dark(),
26+
theme: lightTheme ? ThemeData() : ThemeData.dark(),
2727
title: 'Advanced Layout',
2828
home:
2929
scrollMode == ScrollMode.complex

dev/benchmarks/platform_views_layout/lib/main.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ class PlatformViewApp extends StatefulWidget {
2020
class PlatformViewAppState extends State<PlatformViewApp> {
2121
@override
2222
Widget build(BuildContext context) {
23-
return MaterialApp(
24-
theme: ThemeData.light(),
25-
title: 'Advanced Layout',
26-
home: const PlatformViewLayout(),
27-
);
23+
return const MaterialApp(title: 'Advanced Layout', home: PlatformViewLayout());
2824
}
2925
}
3026

dev/benchmarks/platform_views_layout/lib/main_ad_banners.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class PlatformViewAppState extends State<PlatformViewApp> {
4040
@override
4141
Widget build(BuildContext context) {
4242
return MaterialApp(
43-
theme: ThemeData.light(),
4443
title: 'Advanced Layout',
4544
home: Scaffold(
4645
appBar: AppBar(title: const Text('Platform View Ad Banners')),

dev/benchmarks/platform_views_layout/lib/main_bottom_ad_banner.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class PlatformViewAppState extends State<PlatformViewApp> {
4444
@override
4545
Widget build(BuildContext context) {
4646
return MaterialApp(
47-
theme: ThemeData.light(),
4847
title: 'Advanced Layout',
4948
home: Scaffold(
5049
appBar: AppBar(title: const Text('Platform View Bottom Ad Banner')),

dev/benchmarks/platform_views_layout/lib/main_hcpp.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ class PlatformViewApp extends StatefulWidget {
2222
class PlatformViewAppState extends State<PlatformViewApp> {
2323
@override
2424
Widget build(BuildContext context) {
25-
return MaterialApp(
26-
theme: ThemeData.light(),
27-
title: 'Advanced Layout',
28-
home: const PlatformViewLayout(),
29-
);
25+
return const MaterialApp(title: 'Advanced Layout', home: PlatformViewLayout());
3026
}
3127
}
3228

dev/benchmarks/platform_views_layout/lib/main_non_intersecting.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ class PlatformViewApp extends StatefulWidget {
2020
class PlatformViewAppState extends State<PlatformViewApp> {
2121
@override
2222
Widget build(BuildContext context) {
23-
return MaterialApp(
24-
theme: ThemeData.light(),
25-
title: 'Advanced Layout',
26-
home: const PlatformViewLayout(),
27-
);
23+
return const MaterialApp(title: 'Advanced Layout', home: PlatformViewLayout());
2824
}
2925
}
3026

dev/benchmarks/platform_views_layout_hybrid_composition/lib/main.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ class PlatformViewApp extends StatefulWidget {
2424
class PlatformViewAppState extends State<PlatformViewApp> {
2525
@override
2626
Widget build(BuildContext context) {
27-
return MaterialApp(
28-
theme: ThemeData.light(),
29-
title: 'Advanced Layout',
30-
home: const PlatformViewLayout(),
31-
);
27+
return const MaterialApp(title: 'Advanced Layout', home: PlatformViewLayout());
3228
}
3329
}
3430

dev/integration_tests/flutter_gallery/lib/demo/fortnightly/fortnightly.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ over water meant for the whole central valley of California? The story will shoc
176176
final ThemeData _fortnightlyTheme = _buildFortnightlyTheme();
177177

178178
ThemeData _buildFortnightlyTheme() {
179-
final ThemeData base = ThemeData.light();
179+
final ThemeData base = ThemeData();
180180
return base.copyWith(
181181
primaryTextTheme: _buildTextTheme(base.primaryTextTheme),
182182
scaffoldBackgroundColor: Colors.white,

dev/integration_tests/flutter_gallery/lib/demo/shrine/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ IconThemeData _customIconTheme(IconThemeData original) {
8181
}
8282

8383
ThemeData _buildShrineTheme() {
84-
final ThemeData base = ThemeData.light();
84+
final ThemeData base = ThemeData();
8585
return base.copyWith(
8686
colorScheme: kShrineColorScheme,
8787
primaryColor: kShrinePink100,

dev/integration_tests/new_gallery/lib/studies/crane/theme.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ IconThemeData _customIconTheme(IconThemeData original, Color color) {
1515
}
1616

1717
ThemeData _buildCraneTheme() {
18-
final ThemeData base = ThemeData.light();
18+
final ThemeData base = ThemeData();
1919

2020
return base.copyWith(
2121
colorScheme: const ColorScheme.light().copyWith(

0 commit comments

Comments
 (0)