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 https://github.com/flutter/flutter/issues/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.* - https://github.com/flutter/flutter/issues/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>
This commit is contained in:
@@ -13,7 +13,7 @@ class AnimatedSlideApp extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(theme: ThemeData(useMaterial3: true), home: const AnimatedSlideExample());
|
||||
return const MaterialApp(home: AnimatedSlideExample());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -168,7 +168,6 @@ class RawMenuAnchorApp extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData.from(
|
||||
useMaterial3: true,
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: Colors.blue,
|
||||
dynamicSchemeVariant: DynamicSchemeVariant.vibrant,
|
||||
|
||||
@@ -14,7 +14,6 @@ class ScrollNotificationObserverApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
// The Scaffold widget contains a [ScrollNotificationObserver].
|
||||
// This is used by [AppBar] for its scrolled under behavior.
|
||||
//
|
||||
|
||||
@@ -89,10 +89,7 @@ class _ScrollNotificationDemoState extends State<ScrollNotificationDemo> {
|
||||
}
|
||||
|
||||
return MaterialApp(
|
||||
theme: ThemeData.from(
|
||||
useMaterial3: true,
|
||||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.blueGrey),
|
||||
),
|
||||
theme: ThemeData.from(colorScheme: ColorScheme.fromSeed(seedColor: Colors.blueGrey)),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Listening to a ScrollPosition'),
|
||||
|
||||
@@ -16,10 +16,7 @@ class DecoratedSliverClipExampleApp extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: 'DecoratedSliver Clip Example',
|
||||
theme: ThemeData(
|
||||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
|
||||
useMaterial3: true,
|
||||
),
|
||||
theme: ThemeData(colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple)),
|
||||
home: const DecoratedSliverClipExample(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -14,11 +14,7 @@ class DefaultTextStyleApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(
|
||||
useMaterial3: true,
|
||||
brightness: Brightness.light,
|
||||
colorSchemeSeed: Colors.purple,
|
||||
),
|
||||
theme: ThemeData(brightness: Brightness.light, colorSchemeSeed: Colors.purple),
|
||||
home: const DefaultTextStyleExample(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ class TextMagnifierExampleApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
home: Scaffold(
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 48.0),
|
||||
|
||||
Reference in New Issue
Block a user