mirror of
https://github.com/flutter/flutter
synced 2024-10-13 03:32:55 +00:00
Deprecate the accentIconTheme ThemeData constructor parameter (#85144)
This commit is contained in:
parent
042fd77ce1
commit
99220b01c4
|
@ -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,
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue