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
99220b01
Unverified
Commit
99220b01
authored
Jun 23, 2021
by
Hans Muller
Committed by
GitHub
Jun 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate the accentIconTheme ThemeData constructor parameter (#85144)
parent
042fd77c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
9 deletions
+52
-9
theme_data.dart
packages/flutter/lib/src/material/theme_data.dart
+52
-0
theme_data_test.dart
packages/flutter/test/material/theme_data_test.dart
+0
-9
No files found.
packages/flutter/lib/src/material/theme_data.dart
View file @
99220b01
...
...
@@ -226,11 +226,15 @@ class ThemeData with Diagnosticable {
Color
?
primaryColorDark
,
@Deprecated
(
'Use colorScheme.secondary instead. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
Color
?
accentColor
,
@Deprecated
(
'No longer used by the framework, please remove any reference to it. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
Brightness
?
accentColorBrightness
,
...
...
@@ -282,12 +286,20 @@ class ThemeData with Diagnosticable {
TextTheme
?
primaryTextTheme
,
@Deprecated
(
'No longer used by the framework, please remove any reference to it. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
TextTheme
?
accentTextTheme
,
InputDecorationTheme
?
inputDecorationTheme
,
IconThemeData
?
iconTheme
,
IconThemeData
?
primaryIconTheme
,
@Deprecated
(
'No longer used by the framework, please remove any reference to it. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
IconThemeData
?
accentIconTheme
,
SliderThemeData
?
sliderTheme
,
TabBarTheme
?
tabBarTheme
,
...
...
@@ -568,11 +580,15 @@ class ThemeData with Diagnosticable {
required
this
.
shadowColor
,
@Deprecated
(
'Use colorScheme.secondary instead. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
required
this
.
accentColor
,
@Deprecated
(
'No longer used by the framework, please remove any reference to it. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
required
this
.
accentColorBrightness
,
...
...
@@ -621,6 +637,8 @@ class ThemeData with Diagnosticable {
required
this
.
primaryTextTheme
,
@Deprecated
(
'No longer used by the framework, please remove any reference to it. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
required
this
.
accentTextTheme
,
...
...
@@ -629,6 +647,8 @@ class ThemeData with Diagnosticable {
required
this
.
primaryIconTheme
,
@Deprecated
(
'No longer used by the framework, please remove any reference to it. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
required
this
.
accentIconTheme
,
...
...
@@ -918,6 +938,8 @@ class ThemeData with Diagnosticable {
/// can be used.
@Deprecated
(
'Use colorScheme.secondary instead. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
final
Color
accentColor
;
...
...
@@ -932,6 +954,8 @@ class ThemeData with Diagnosticable {
/// of any color can be found with [ThemeData.estimateBrightnessForColor].
@Deprecated
(
'No longer used by the framework, please remove any reference to it. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
final
Brightness
accentColorBrightness
;
...
...
@@ -1076,6 +1100,8 @@ class ThemeData with Diagnosticable {
/// ```
@Deprecated
(
'No longer used by the framework, please remove any reference to it. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
final
TextTheme
accentTextTheme
;
...
...
@@ -1100,6 +1126,8 @@ class ThemeData with Diagnosticable {
/// the theme's [colorScheme] [ColorScheme.secondary].
@Deprecated
(
'No longer used by the framework, please remove any reference to it. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
final
IconThemeData
accentIconTheme
;
...
...
@@ -1330,7 +1358,19 @@ class ThemeData with Diagnosticable {
Brightness
?
primaryColorBrightness
,
Color
?
primaryColorLight
,
Color
?
primaryColorDark
,
@Deprecated
(
'No longer used by the framework, please remove any reference to it. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
Color
?
accentColor
,
@Deprecated
(
'No longer used by the framework, please remove any reference to it. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
Brightness
?
accentColorBrightness
,
Color
?
canvasColor
,
Color
?
shadowColor
,
...
...
@@ -1377,10 +1417,22 @@ class ThemeData with Diagnosticable {
Color
?
toggleableActiveColor
,
TextTheme
?
textTheme
,
TextTheme
?
primaryTextTheme
,
@Deprecated
(
'No longer used by the framework, please remove any reference to it. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
TextTheme
?
accentTextTheme
,
InputDecorationTheme
?
inputDecorationTheme
,
IconThemeData
?
iconTheme
,
IconThemeData
?
primaryIconTheme
,
@Deprecated
(
'No longer used by the framework, please remove any reference to it. '
'For more information, consult the migration guide at '
'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
'This feature was deprecated after v2.3.0-0.1.pre.'
,
)
IconThemeData
?
accentIconTheme
,
SliderThemeData
?
sliderTheme
,
TabBarTheme
?
tabBarTheme
,
...
...
packages/flutter/test/material/theme_data_test.dart
View file @
99220b01
...
...
@@ -105,7 +105,6 @@ void main() {
expect
(
themeData
.
textTheme
.
bodyText1
!.
fontFamily
,
equals
(
'Ahem'
));
expect
(
themeData
.
primaryTextTheme
.
headline3
!.
fontFamily
,
equals
(
'Ahem'
));
expect
(
themeData
.
accentTextTheme
.
headline1
!.
fontFamily
,
equals
(
'Ahem'
));
// Shouldn't override the specified style's family
expect
(
themeData
.
textTheme
.
headline6
!.
fontFamily
,
equals
(
'Roboto'
));
...
...
@@ -405,8 +404,6 @@ void main() {
primaryColorBrightness:
otherTheme
.
primaryColorBrightness
,
primaryColorLight:
otherTheme
.
primaryColorLight
,
primaryColorDark:
otherTheme
.
primaryColorDark
,
accentColor:
otherTheme
.
accentColor
,
accentColorBrightness:
otherTheme
.
accentColorBrightness
,
canvasColor:
otherTheme
.
canvasColor
,
shadowColor:
otherTheme
.
shadowColor
,
scaffoldBackgroundColor:
otherTheme
.
scaffoldBackgroundColor
,
...
...
@@ -436,11 +433,9 @@ void main() {
toggleableActiveColor:
otherTheme
.
toggleableActiveColor
,
textTheme:
otherTheme
.
textTheme
,
primaryTextTheme:
otherTheme
.
primaryTextTheme
,
accentTextTheme:
otherTheme
.
accentTextTheme
,
inputDecorationTheme:
otherTheme
.
inputDecorationTheme
,
iconTheme:
otherTheme
.
iconTheme
,
primaryIconTheme:
otherTheme
.
primaryIconTheme
,
accentIconTheme:
otherTheme
.
accentIconTheme
,
sliderTheme:
otherTheme
.
sliderTheme
,
tabBarTheme:
otherTheme
.
tabBarTheme
,
tooltipTheme:
otherTheme
.
tooltipTheme
,
...
...
@@ -478,8 +473,6 @@ void main() {
expect
(
themeDataCopy
.
primaryColorBrightness
,
equals
(
otherTheme
.
primaryColorBrightness
));
expect
(
themeDataCopy
.
primaryColorLight
,
equals
(
otherTheme
.
primaryColorLight
));
expect
(
themeDataCopy
.
primaryColorDark
,
equals
(
otherTheme
.
primaryColorDark
));
expect
(
themeDataCopy
.
accentColor
,
equals
(
otherTheme
.
accentColor
));
expect
(
themeDataCopy
.
accentColorBrightness
,
equals
(
otherTheme
.
accentColorBrightness
));
expect
(
themeDataCopy
.
canvasColor
,
equals
(
otherTheme
.
canvasColor
));
expect
(
themeDataCopy
.
shadowColor
,
equals
(
otherTheme
.
shadowColor
));
expect
(
themeDataCopy
.
scaffoldBackgroundColor
,
equals
(
otherTheme
.
scaffoldBackgroundColor
));
...
...
@@ -509,10 +502,8 @@ void main() {
expect
(
themeDataCopy
.
indicatorColor
,
equals
(
otherTheme
.
indicatorColor
));
expect
(
themeDataCopy
.
hintColor
,
equals
(
otherTheme
.
hintColor
));
expect
(
themeDataCopy
.
errorColor
,
equals
(
otherTheme
.
errorColor
));
expect
(
themeDataCopy
.
toggleableActiveColor
,
equals
(
otherTheme
.
accentColor
));
expect
(
themeDataCopy
.
textTheme
,
equals
(
otherTheme
.
textTheme
));
expect
(
themeDataCopy
.
primaryTextTheme
,
equals
(
otherTheme
.
primaryTextTheme
));
expect
(
themeDataCopy
.
accentTextTheme
,
equals
(
otherTheme
.
accentTextTheme
));
expect
(
themeDataCopy
.
sliderTheme
,
equals
(
otherTheme
.
sliderTheme
));
expect
(
themeDataCopy
.
tabBarTheme
,
equals
(
otherTheme
.
tabBarTheme
));
expect
(
themeDataCopy
.
tooltipTheme
,
equals
(
otherTheme
.
tooltipTheme
));
...
...
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