@@ -366,12 +366,6 @@ class ThemeData with Diagnosticable {
366366 TimePickerThemeData ? timePickerTheme,
367367 ToggleButtonsThemeData ? toggleButtonsTheme,
368368 TooltipThemeData ? tooltipTheme,
369- // DEPRECATED (newest deprecations at the bottom)
370- @Deprecated (
371- 'Use colorScheme.error instead. '
372- 'This feature was deprecated after v3.3.0-0.5.pre.' ,
373- )
374- Color ? errorColor,
375369 }) {
376370 // GENERAL CONFIGURATION
377371 cupertinoOverrideTheme = cupertinoOverrideTheme? .noDefault ();
@@ -428,7 +422,6 @@ class ThemeData with Diagnosticable {
428422 dividerColor ?? = colorScheme.outline;
429423 dialogBackgroundColor ?? = colorScheme.background;
430424 indicatorColor ?? = onPrimarySurfaceColor;
431- errorColor ?? = colorScheme.error;
432425 applyElevationOverlayColor ?? = brightness == Brightness .dark;
433426 }
434427 applyElevationOverlayColor ?? = false ;
@@ -545,9 +538,6 @@ class ThemeData with Diagnosticable {
545538 timePickerTheme ?? = const TimePickerThemeData ();
546539 toggleButtonsTheme ?? = const ToggleButtonsThemeData ();
547540 tooltipTheme ?? = const TooltipThemeData ();
548-
549- // DEPRECATED (newest deprecations at the bottom)
550- errorColor ?? = Colors .red[700 ]! ;
551541 return ThemeData .raw (
552542 // For the sanity of the reader, make sure these properties are in the same
553543 // order in every place that they are separated by section comments (e.g.
@@ -640,8 +630,6 @@ class ThemeData with Diagnosticable {
640630 timePickerTheme: timePickerTheme,
641631 toggleButtonsTheme: toggleButtonsTheme,
642632 tooltipTheme: tooltipTheme,
643- // DEPRECATED (newest deprecations at the bottom)
644- errorColor: errorColor,
645633 );
646634 }
647635
@@ -747,18 +735,7 @@ class ThemeData with Diagnosticable {
747735 required this .timePickerTheme,
748736 required this .toggleButtonsTheme,
749737 required this .tooltipTheme,
750- // DEPRECATED (newest deprecations at the bottom)
751- @Deprecated (
752- 'Use colorScheme.error instead. '
753- 'This feature was deprecated after v3.3.0-0.5.pre.' ,
754- )
755- Color ? errorColor,
756-
757- }) : // DEPRECATED (newest deprecations at the bottom)
758- // should not be `required`, use getter pattern to avoid breakages.
759- _errorColor = errorColor,
760- // DEPRECATED (newest deprecations at the bottom)
761- assert (errorColor != null );
738+ });
762739
763740 /// Create a [ThemeData] based on the colors in the given [colorScheme] and
764741 /// text styles of the optional [textTheme] .
@@ -807,7 +784,6 @@ class ThemeData with Diagnosticable {
807784 dividerColor: colorScheme.onSurface.withOpacity (0.12 ),
808785 dialogBackgroundColor: colorScheme.background,
809786 indicatorColor: onPrimarySurfaceColor,
810- errorColor: colorScheme.error,
811787 textTheme: textTheme,
812788 applyElevationOverlayColor: isDark,
813789 useMaterial3: useMaterial3,
@@ -1414,17 +1390,6 @@ class ThemeData with Diagnosticable {
14141390 /// This is the value returned from [TooltipTheme.of] .
14151391 final TooltipThemeData tooltipTheme;
14161392
1417- // DEPRECATED (newest deprecations at the bottom)
1418-
1419- /// Obsolete property that was used for input validation errors, e.g. in
1420- /// [TextField] fields. Use [ColorScheme.error] instead.
1421- @Deprecated (
1422- 'Use colorScheme.error instead. '
1423- 'This feature was deprecated after v3.3.0-0.5.pre.' ,
1424- )
1425- Color get errorColor => _errorColor! ;
1426- final Color ? _errorColor;
1427-
14281393 /// Creates a copy of this theme but with the given fields replaced with the new values.
14291394 ///
14301395 /// The [brightness] value is applied to the [colorScheme] .
@@ -1524,11 +1489,6 @@ class ThemeData with Diagnosticable {
15241489 ToggleButtonsThemeData ? toggleButtonsTheme,
15251490 TooltipThemeData ? tooltipTheme,
15261491 // DEPRECATED (newest deprecations at the bottom)
1527- @Deprecated (
1528- 'Use colorScheme.error instead. '
1529- 'This feature was deprecated after v3.3.0-0.5.pre.' ,
1530- )
1531- Color ? errorColor,
15321492 @Deprecated (
15331493 'Use a ThemeData constructor (.from, .light, or .dark) instead. '
15341494 'These constructors all have a useMaterial3 argument, '
@@ -1633,8 +1593,6 @@ class ThemeData with Diagnosticable {
16331593 timePickerTheme: timePickerTheme ?? this .timePickerTheme,
16341594 toggleButtonsTheme: toggleButtonsTheme ?? this .toggleButtonsTheme,
16351595 tooltipTheme: tooltipTheme ?? this .tooltipTheme,
1636- // DEPRECATED (newest deprecations at the bottom)
1637- errorColor: errorColor ?? _errorColor,
16381596 );
16391597 }
16401598
@@ -1828,8 +1786,6 @@ class ThemeData with Diagnosticable {
18281786 timePickerTheme: TimePickerThemeData .lerp (a.timePickerTheme, b.timePickerTheme, t),
18291787 toggleButtonsTheme: ToggleButtonsThemeData .lerp (a.toggleButtonsTheme, b.toggleButtonsTheme, t)! ,
18301788 tooltipTheme: TooltipThemeData .lerp (a.tooltipTheme, b.tooltipTheme, t)! ,
1831- // DEPRECATED (newest deprecations at the bottom)
1832- errorColor: Color .lerp (a.errorColor, b.errorColor, t),
18331789 );
18341790 }
18351791
@@ -1929,9 +1885,7 @@ class ThemeData with Diagnosticable {
19291885 other.textSelectionTheme == textSelectionTheme &&
19301886 other.timePickerTheme == timePickerTheme &&
19311887 other.toggleButtonsTheme == toggleButtonsTheme &&
1932- other.tooltipTheme == tooltipTheme &&
1933- // DEPRECATED (newest deprecations at the bottom)
1934- other.errorColor == errorColor;
1888+ other.tooltipTheme == tooltipTheme;
19351889 }
19361890
19371891 @override
@@ -2030,8 +1984,6 @@ class ThemeData with Diagnosticable {
20301984 timePickerTheme,
20311985 toggleButtonsTheme,
20321986 tooltipTheme,
2033- // DEPRECATED (newest deprecations at the bottom)
2034- errorColor,
20351987 ];
20361988 return Object .hashAll (values);
20371989 }
@@ -2131,8 +2083,6 @@ class ThemeData with Diagnosticable {
21312083 properties.add (DiagnosticsProperty <TimePickerThemeData >('timePickerTheme' , timePickerTheme, defaultValue: defaultData.timePickerTheme, level: DiagnosticLevel .debug));
21322084 properties.add (DiagnosticsProperty <ToggleButtonsThemeData >('toggleButtonsTheme' , toggleButtonsTheme, level: DiagnosticLevel .debug));
21332085 properties.add (DiagnosticsProperty <TooltipThemeData >('tooltipTheme' , tooltipTheme, level: DiagnosticLevel .debug));
2134- // DEPRECATED (newest deprecations at the bottom)
2135- properties.add (ColorProperty ('errorColor' , errorColor, defaultValue: defaultData.errorColor, level: DiagnosticLevel .debug));
21362086 }
21372087}
21382088
0 commit comments