Unverified Commit 99220b01 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Deprecate the accentIconTheme ThemeData constructor parameter (#85144)

parent 042fd77c
...@@ -226,11 +226,15 @@ class ThemeData with Diagnosticable { ...@@ -226,11 +226,15 @@ class ThemeData with Diagnosticable {
Color? primaryColorDark, Color? primaryColorDark,
@Deprecated( @Deprecated(
'Use colorScheme.secondary instead. ' '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.', 'This feature was deprecated after v2.3.0-0.1.pre.',
) )
Color? accentColor, Color? accentColor,
@Deprecated( @Deprecated(
'No longer used by the framework, please remove any reference to it. ' '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.', 'This feature was deprecated after v2.3.0-0.1.pre.',
) )
Brightness? accentColorBrightness, Brightness? accentColorBrightness,
...@@ -282,12 +286,20 @@ class ThemeData with Diagnosticable { ...@@ -282,12 +286,20 @@ class ThemeData with Diagnosticable {
TextTheme? primaryTextTheme, TextTheme? primaryTextTheme,
@Deprecated( @Deprecated(
'No longer used by the framework, please remove any reference to it. ' '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.', 'This feature was deprecated after v2.3.0-0.1.pre.',
) )
TextTheme? accentTextTheme, TextTheme? accentTextTheme,
InputDecorationTheme? inputDecorationTheme, InputDecorationTheme? inputDecorationTheme,
IconThemeData? iconTheme, IconThemeData? iconTheme,
IconThemeData? primaryIconTheme, 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, IconThemeData? accentIconTheme,
SliderThemeData? sliderTheme, SliderThemeData? sliderTheme,
TabBarTheme? tabBarTheme, TabBarTheme? tabBarTheme,
...@@ -568,11 +580,15 @@ class ThemeData with Diagnosticable { ...@@ -568,11 +580,15 @@ class ThemeData with Diagnosticable {
required this.shadowColor, required this.shadowColor,
@Deprecated( @Deprecated(
'Use colorScheme.secondary instead. ' '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.', 'This feature was deprecated after v2.3.0-0.1.pre.',
) )
required this.accentColor, required this.accentColor,
@Deprecated( @Deprecated(
'No longer used by the framework, please remove any reference to it. ' '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.', 'This feature was deprecated after v2.3.0-0.1.pre.',
) )
required this.accentColorBrightness, required this.accentColorBrightness,
...@@ -621,6 +637,8 @@ class ThemeData with Diagnosticable { ...@@ -621,6 +637,8 @@ class ThemeData with Diagnosticable {
required this.primaryTextTheme, required this.primaryTextTheme,
@Deprecated( @Deprecated(
'No longer used by the framework, please remove any reference to it. ' '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.', 'This feature was deprecated after v2.3.0-0.1.pre.',
) )
required this.accentTextTheme, required this.accentTextTheme,
...@@ -629,6 +647,8 @@ class ThemeData with Diagnosticable { ...@@ -629,6 +647,8 @@ class ThemeData with Diagnosticable {
required this.primaryIconTheme, required this.primaryIconTheme,
@Deprecated( @Deprecated(
'No longer used by the framework, please remove any reference to it. ' '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.', 'This feature was deprecated after v2.3.0-0.1.pre.',
) )
required this.accentIconTheme, required this.accentIconTheme,
...@@ -918,6 +938,8 @@ class ThemeData with Diagnosticable { ...@@ -918,6 +938,8 @@ class ThemeData with Diagnosticable {
/// can be used. /// can be used.
@Deprecated( @Deprecated(
'Use colorScheme.secondary instead. ' '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.', 'This feature was deprecated after v2.3.0-0.1.pre.',
) )
final Color accentColor; final Color accentColor;
...@@ -932,6 +954,8 @@ class ThemeData with Diagnosticable { ...@@ -932,6 +954,8 @@ class ThemeData with Diagnosticable {
/// of any color can be found with [ThemeData.estimateBrightnessForColor]. /// of any color can be found with [ThemeData.estimateBrightnessForColor].
@Deprecated( @Deprecated(
'No longer used by the framework, please remove any reference to it. ' '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.', 'This feature was deprecated after v2.3.0-0.1.pre.',
) )
final Brightness accentColorBrightness; final Brightness accentColorBrightness;
...@@ -1076,6 +1100,8 @@ class ThemeData with Diagnosticable { ...@@ -1076,6 +1100,8 @@ class ThemeData with Diagnosticable {
/// ``` /// ```
@Deprecated( @Deprecated(
'No longer used by the framework, please remove any reference to it. ' '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.', 'This feature was deprecated after v2.3.0-0.1.pre.',
) )
final TextTheme accentTextTheme; final TextTheme accentTextTheme;
...@@ -1100,6 +1126,8 @@ class ThemeData with Diagnosticable { ...@@ -1100,6 +1126,8 @@ class ThemeData with Diagnosticable {
/// the theme's [colorScheme] [ColorScheme.secondary]. /// the theme's [colorScheme] [ColorScheme.secondary].
@Deprecated( @Deprecated(
'No longer used by the framework, please remove any reference to it. ' '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.', 'This feature was deprecated after v2.3.0-0.1.pre.',
) )
final IconThemeData accentIconTheme; final IconThemeData accentIconTheme;
...@@ -1330,7 +1358,19 @@ class ThemeData with Diagnosticable { ...@@ -1330,7 +1358,19 @@ class ThemeData with Diagnosticable {
Brightness? primaryColorBrightness, Brightness? primaryColorBrightness,
Color? primaryColorLight, Color? primaryColorLight,
Color? primaryColorDark, 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, 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, Brightness? accentColorBrightness,
Color? canvasColor, Color? canvasColor,
Color? shadowColor, Color? shadowColor,
...@@ -1377,10 +1417,22 @@ class ThemeData with Diagnosticable { ...@@ -1377,10 +1417,22 @@ class ThemeData with Diagnosticable {
Color? toggleableActiveColor, Color? toggleableActiveColor,
TextTheme? textTheme, TextTheme? textTheme,
TextTheme? primaryTextTheme, 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, TextTheme? accentTextTheme,
InputDecorationTheme? inputDecorationTheme, InputDecorationTheme? inputDecorationTheme,
IconThemeData? iconTheme, IconThemeData? iconTheme,
IconThemeData? primaryIconTheme, 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, IconThemeData? accentIconTheme,
SliderThemeData? sliderTheme, SliderThemeData? sliderTheme,
TabBarTheme? tabBarTheme, TabBarTheme? tabBarTheme,
......
...@@ -105,7 +105,6 @@ void main() { ...@@ -105,7 +105,6 @@ void main() {
expect(themeData.textTheme.bodyText1!.fontFamily, equals('Ahem')); expect(themeData.textTheme.bodyText1!.fontFamily, equals('Ahem'));
expect(themeData.primaryTextTheme.headline3!.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 // Shouldn't override the specified style's family
expect(themeData.textTheme.headline6!.fontFamily, equals('Roboto')); expect(themeData.textTheme.headline6!.fontFamily, equals('Roboto'));
...@@ -405,8 +404,6 @@ void main() { ...@@ -405,8 +404,6 @@ void main() {
primaryColorBrightness: otherTheme.primaryColorBrightness, primaryColorBrightness: otherTheme.primaryColorBrightness,
primaryColorLight: otherTheme.primaryColorLight, primaryColorLight: otherTheme.primaryColorLight,
primaryColorDark: otherTheme.primaryColorDark, primaryColorDark: otherTheme.primaryColorDark,
accentColor: otherTheme.accentColor,
accentColorBrightness: otherTheme.accentColorBrightness,
canvasColor: otherTheme.canvasColor, canvasColor: otherTheme.canvasColor,
shadowColor: otherTheme.shadowColor, shadowColor: otherTheme.shadowColor,
scaffoldBackgroundColor: otherTheme.scaffoldBackgroundColor, scaffoldBackgroundColor: otherTheme.scaffoldBackgroundColor,
...@@ -436,11 +433,9 @@ void main() { ...@@ -436,11 +433,9 @@ void main() {
toggleableActiveColor: otherTheme.toggleableActiveColor, toggleableActiveColor: otherTheme.toggleableActiveColor,
textTheme: otherTheme.textTheme, textTheme: otherTheme.textTheme,
primaryTextTheme: otherTheme.primaryTextTheme, primaryTextTheme: otherTheme.primaryTextTheme,
accentTextTheme: otherTheme.accentTextTheme,
inputDecorationTheme: otherTheme.inputDecorationTheme, inputDecorationTheme: otherTheme.inputDecorationTheme,
iconTheme: otherTheme.iconTheme, iconTheme: otherTheme.iconTheme,
primaryIconTheme: otherTheme.primaryIconTheme, primaryIconTheme: otherTheme.primaryIconTheme,
accentIconTheme: otherTheme.accentIconTheme,
sliderTheme: otherTheme.sliderTheme, sliderTheme: otherTheme.sliderTheme,
tabBarTheme: otherTheme.tabBarTheme, tabBarTheme: otherTheme.tabBarTheme,
tooltipTheme: otherTheme.tooltipTheme, tooltipTheme: otherTheme.tooltipTheme,
...@@ -478,8 +473,6 @@ void main() { ...@@ -478,8 +473,6 @@ void main() {
expect(themeDataCopy.primaryColorBrightness, equals(otherTheme.primaryColorBrightness)); expect(themeDataCopy.primaryColorBrightness, equals(otherTheme.primaryColorBrightness));
expect(themeDataCopy.primaryColorLight, equals(otherTheme.primaryColorLight)); expect(themeDataCopy.primaryColorLight, equals(otherTheme.primaryColorLight));
expect(themeDataCopy.primaryColorDark, equals(otherTheme.primaryColorDark)); 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.canvasColor, equals(otherTheme.canvasColor));
expect(themeDataCopy.shadowColor, equals(otherTheme.shadowColor)); expect(themeDataCopy.shadowColor, equals(otherTheme.shadowColor));
expect(themeDataCopy.scaffoldBackgroundColor, equals(otherTheme.scaffoldBackgroundColor)); expect(themeDataCopy.scaffoldBackgroundColor, equals(otherTheme.scaffoldBackgroundColor));
...@@ -509,10 +502,8 @@ void main() { ...@@ -509,10 +502,8 @@ void main() {
expect(themeDataCopy.indicatorColor, equals(otherTheme.indicatorColor)); expect(themeDataCopy.indicatorColor, equals(otherTheme.indicatorColor));
expect(themeDataCopy.hintColor, equals(otherTheme.hintColor)); expect(themeDataCopy.hintColor, equals(otherTheme.hintColor));
expect(themeDataCopy.errorColor, equals(otherTheme.errorColor)); expect(themeDataCopy.errorColor, equals(otherTheme.errorColor));
expect(themeDataCopy.toggleableActiveColor, equals(otherTheme.accentColor));
expect(themeDataCopy.textTheme, equals(otherTheme.textTheme)); expect(themeDataCopy.textTheme, equals(otherTheme.textTheme));
expect(themeDataCopy.primaryTextTheme, equals(otherTheme.primaryTextTheme)); expect(themeDataCopy.primaryTextTheme, equals(otherTheme.primaryTextTheme));
expect(themeDataCopy.accentTextTheme, equals(otherTheme.accentTextTheme));
expect(themeDataCopy.sliderTheme, equals(otherTheme.sliderTheme)); expect(themeDataCopy.sliderTheme, equals(otherTheme.sliderTheme));
expect(themeDataCopy.tabBarTheme, equals(otherTheme.tabBarTheme)); expect(themeDataCopy.tabBarTheme, equals(otherTheme.tabBarTheme));
expect(themeDataCopy.tooltipTheme, equals(otherTheme.tooltipTheme)); expect(themeDataCopy.tooltipTheme, equals(otherTheme.tooltipTheme));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment