Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
3567140d
Unverified
Commit
3567140d
authored
Jul 28, 2023
by
Qun Cheng
Committed by
GitHub
Jul 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate `useMaterial3` parameter in `ThemeData.copyWith()` (#131455)
parent
9cdde86f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
1 deletion
+25
-1
fix_theme_data.yaml
...ges/flutter/lib/fix_data/fix_material/fix_theme_data.yaml
+11
-0
theme_data.dart
packages/flutter/lib/src/material/theme_data.dart
+8
-1
theme_data.dart
packages/flutter/test_fixes/material/theme_data.dart
+3
-0
theme_data.dart.expect
packages/flutter/test_fixes/material/theme_data.dart.expect
+3
-0
No files found.
packages/flutter/lib/fix_data/fix_material/fix_theme_data.yaml
View file @
3567140d
...
...
@@ -1686,4 +1686,15 @@ transforms:
kind
:
'
fragment'
value
:
'
arguments[colorScheme]'
# Changes made in https://github.com/flutter/flutter/pull/131455
-
title
:
"
Remove
'useMaterial3'"
date
:
2023-07-27
element
:
uris
:
[
'
material.dart'
]
method
:
'
copyWith'
inClass
:
'
ThemeData'
changes
:
-
kind
:
'
removeParameter'
name
:
'
useMaterial3'
# Before adding a new fix: read instructions at the top of this file.
packages/flutter/lib/src/material/theme_data.dart
View file @
3567140d
...
...
@@ -1525,7 +1525,6 @@ class ThemeData with Diagnosticable {
TargetPlatform
?
platform
,
ScrollbarThemeData
?
scrollbarTheme
,
InteractiveInkFeatureFactory
?
splashFactory
,
bool
?
useMaterial3
,
VisualDensity
?
visualDensity
,
// COLOR
// [colorScheme] is the preferred way to configure colors. The other color
...
...
@@ -1637,6 +1636,14 @@ class ThemeData with Diagnosticable {
'This feature was deprecated after v3.3.0-0.6.pre.'
,
)
Color
?
bottomAppBarColor
,
@Deprecated
(
'Use a ThemeData constructor (.from, .light, or .dark) instead. '
'These constructors all have a useMaterial3 argument, '
'and they set appropriate default values based on its value. '
'See the useMaterial3 API documentation for full details. '
'This feature was deprecated after v3.13.0-0.2.pre.'
,
)
bool
?
useMaterial3
,
})
{
cupertinoOverrideTheme
=
cupertinoOverrideTheme
?.
noDefault
();
return
ThemeData
.
raw
(
...
...
packages/flutter/test_fixes/material/theme_data.dart
View file @
3567140d
...
...
@@ -234,4 +234,7 @@ void main() {
themeData
=
ThemeData
(
bottomAppBarColor:
Colors
.
green
);
themeData
=
ThemeData
.
raw
(
bottomAppBarColor:
Colors
.
green
);
themeData
=
ThemeData
.
copyWith
(
bottomAppBarColor:
Colors
.
green
);
// Changes made in https://github.com/flutter/flutter/pull/131455
ThemeData
themeData
=
ThemeData
.
copyWith
(
useMaterial3:
false
);
}
packages/flutter/test_fixes/material/theme_data.dart.expect
View file @
3567140d
...
...
@@ -440,4 +440,7 @@ void main() {
themeData = ThemeData(bottomAppBarTheme: BottomAppBarTheme(color: Colors.green));
themeData = ThemeData.raw(bottomAppBarTheme: BottomAppBarTheme(color: Colors.green));
themeData = ThemeData.copyWith(bottomAppBarTheme: BottomAppBarTheme(color: Colors.green));
// Changes made in https://github.com/flutter/flutter/pull/131455
ThemeData themeData = ThemeData.copyWith();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment