Unverified Commit 45c13702 authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Audit and update deprecation warnings (#75813)

parent 6c83d84e
...@@ -69,12 +69,16 @@ const _DayPickerGridDelegate _kDayPickerGridDelegate = _DayPickerGridDelegate(); ...@@ -69,12 +69,16 @@ const _DayPickerGridDelegate _kDayPickerGridDelegate = _DayPickerGridDelegate();
/// ///
@Deprecated( @Deprecated(
'Use CalendarDatePicker instead. ' 'Use CalendarDatePicker instead. '
'This feature was deprecated after v1.15.3.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
class DayPicker extends StatelessWidget { class DayPicker extends StatelessWidget {
/// Creates a day picker. /// Creates a day picker.
/// ///
/// Rarely used directly. Instead, typically used as part of a [MonthPicker]. /// Rarely used directly. Instead, typically used as part of a [MonthPicker].
@Deprecated(
'Use CalendarDatePicker instead. '
'This feature was deprecated after v1.26.0-18.0.pre.'
)
DayPicker({ DayPicker({
Key? key, Key? key,
required this.selectedDate, required this.selectedDate,
...@@ -351,13 +355,17 @@ class DayPicker extends StatelessWidget { ...@@ -351,13 +355,17 @@ class DayPicker extends StatelessWidget {
/// ///
@Deprecated( @Deprecated(
'Use CalendarDatePicker instead. ' 'Use CalendarDatePicker instead. '
'This feature was deprecated after v1.15.3.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
class MonthPicker extends StatefulWidget { class MonthPicker extends StatefulWidget {
/// Creates a month picker. /// Creates a month picker.
/// ///
/// Rarely used directly. Instead, typically used as part of the dialog shown /// Rarely used directly. Instead, typically used as part of the dialog shown
/// by [showDatePicker]. /// by [showDatePicker].
@Deprecated(
'Use CalendarDatePicker instead. '
'This feature was deprecated after v1.26.0-18.0.pre.'
)
MonthPicker({ MonthPicker({
Key? key, Key? key,
required this.selectedDate, required this.selectedDate,
......
...@@ -25,12 +25,16 @@ import 'theme_data.dart'; ...@@ -25,12 +25,16 @@ import 'theme_data.dart';
/// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide). /// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide).
@Deprecated( @Deprecated(
'Use TextButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). ' 'Use TextButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
'This feature was deprecated after v1.25.0-8.1.pre.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
class FlatButton extends MaterialButton { class FlatButton extends MaterialButton {
/// Create a simple text button. /// Create a simple text button.
/// ///
/// The [autofocus] and [clipBehavior] arguments must not be null. /// The [autofocus] and [clipBehavior] arguments must not be null.
@Deprecated(
'Use TextButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
'This feature was deprecated after v1.26.0-18.0.pre.'
)
const FlatButton({ const FlatButton({
Key? key, Key? key,
required VoidCallback? onPressed, required VoidCallback? onPressed,
......
...@@ -36,13 +36,17 @@ const Duration _kElevationDuration = Duration(milliseconds: 75); ...@@ -36,13 +36,17 @@ const Duration _kElevationDuration = Duration(milliseconds: 75);
/// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide). /// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide).
@Deprecated( @Deprecated(
'Use OutlinedButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). ' 'Use OutlinedButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
'This feature was deprecated after v1.25.0-8.1.pre.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
class OutlineButton extends MaterialButton { class OutlineButton extends MaterialButton {
/// Create an outline button. /// Create an outline button.
/// ///
/// The [highlightElevation] argument must be null or a positive value /// The [highlightElevation] argument must be null or a positive value
/// and the [autofocus] and [clipBehavior] arguments must not be null. /// and the [autofocus] and [clipBehavior] arguments must not be null.
@Deprecated(
'Use OutlinedButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
'This feature was deprecated after v1.26.0-18.0.pre.'
)
const OutlineButton({ const OutlineButton({
Key? key, Key? key,
required VoidCallback? onPressed, required VoidCallback? onPressed,
......
...@@ -26,7 +26,7 @@ import 'theme_data.dart'; ...@@ -26,7 +26,7 @@ import 'theme_data.dart';
/// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide). /// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide).
@Deprecated( @Deprecated(
'Use ElevatedButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). ' 'Use ElevatedButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
'This feature was deprecated after v1.25.0-8.1.pre.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
class RaisedButton extends MaterialButton { class RaisedButton extends MaterialButton {
/// Create a filled button. /// Create a filled button.
...@@ -35,6 +35,10 @@ class RaisedButton extends MaterialButton { ...@@ -35,6 +35,10 @@ class RaisedButton extends MaterialButton {
/// Additionally, [elevation], [hoverElevation], [focusElevation], /// Additionally, [elevation], [hoverElevation], [focusElevation],
/// [highlightElevation], and [disabledElevation] must be non-negative, if /// [highlightElevation], and [disabledElevation] must be non-negative, if
/// specified. /// specified.
@Deprecated(
'Use ElevatedButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
'This feature was deprecated after v1.26.0-18.0.pre.'
)
const RaisedButton({ const RaisedButton({
Key? key, Key? key,
required VoidCallback? onPressed, required VoidCallback? onPressed,
......
...@@ -1486,7 +1486,13 @@ abstract class BaseSliderTrackShape { ...@@ -1486,7 +1486,13 @@ abstract class BaseSliderTrackShape {
/// * [RoundedRectSliderTrackShape], for a similar track with rounded edges. /// * [RoundedRectSliderTrackShape], for a similar track with rounded edges.
class RectangularSliderTrackShape extends SliderTrackShape with BaseSliderTrackShape { class RectangularSliderTrackShape extends SliderTrackShape with BaseSliderTrackShape {
/// Creates a slider track that draws 2 rectangles. /// Creates a slider track that draws 2 rectangles.
const RectangularSliderTrackShape({ this.disabledThumbGapWidth = 2.0 }); const RectangularSliderTrackShape({
@Deprecated(
'It no longer has any effect because the thumb does not shrink when the slider is disabled now. '
'This feature was deprecated after v1.26.0-18.0.pre.'
)
this.disabledThumbGapWidth = 2.0
});
/// Horizontal spacing, or gap, between the disabled thumb and the track. /// Horizontal spacing, or gap, between the disabled thumb and the track.
/// ///
...@@ -1496,7 +1502,7 @@ class RectangularSliderTrackShape extends SliderTrackShape with BaseSliderTrackS ...@@ -1496,7 +1502,7 @@ class RectangularSliderTrackShape extends SliderTrackShape with BaseSliderTrackS
/// thumb radius. /// thumb radius.
@Deprecated( @Deprecated(
'It no longer has any effect because the thumb does not shrink when the slider is disabled now. ' 'It no longer has any effect because the thumb does not shrink when the slider is disabled now. '
'This feature was deprecated after v1.5.7.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
final double disabledThumbGapWidth; final double disabledThumbGapWidth;
......
...@@ -240,17 +240,17 @@ class ThemeData with Diagnosticable { ...@@ -240,17 +240,17 @@ class ThemeData with Diagnosticable {
Color? secondaryHeaderColor, Color? secondaryHeaderColor,
@Deprecated( @Deprecated(
'Use TextSelectionThemeData.selectionColor instead. ' 'Use TextSelectionThemeData.selectionColor instead. '
'This feature was deprecated after v1.23.0-4.0.pre.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
Color? textSelectionColor, Color? textSelectionColor,
@Deprecated( @Deprecated(
'Use TextSelectionThemeData.cursorColor instead. ' 'Use TextSelectionThemeData.cursorColor instead. '
'This feature was deprecated after v1.23.0-4.0.pre.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
Color? cursorColor, Color? cursorColor,
@Deprecated( @Deprecated(
'Use TextSelectionThemeData.selectionHandleColor instead. ' 'Use TextSelectionThemeData.selectionHandleColor instead. '
'This feature was deprecated after v1.23.0-4.0.pre.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
Color? textSelectionHandleColor, Color? textSelectionHandleColor,
Color? backgroundColor, Color? backgroundColor,
...@@ -559,8 +559,20 @@ class ThemeData with Diagnosticable { ...@@ -559,8 +559,20 @@ class ThemeData with Diagnosticable {
required this.buttonColor, required this.buttonColor,
required this.toggleButtonsTheme, required this.toggleButtonsTheme,
required this.secondaryHeaderColor, required this.secondaryHeaderColor,
@Deprecated(
'Use TextSelectionThemeData.selectionColor instead. '
'This feature was deprecated after v1.26.0-18.0.pre.'
)
required this.textSelectionColor, required this.textSelectionColor,
@Deprecated(
'Use TextSelectionThemeData.cursorColor instead. '
'This feature was deprecated after v1.26.0-18.0.pre.'
)
required this.cursorColor, required this.cursorColor,
@Deprecated(
'Use TextSelectionThemeData.selectionHandleColor instead. '
'This feature was deprecated after v1.26.0-18.0.pre.'
)
required this.textSelectionHandleColor, required this.textSelectionHandleColor,
required this.backgroundColor, required this.backgroundColor,
required this.dialogBackgroundColor, required this.dialogBackgroundColor,
...@@ -610,6 +622,10 @@ class ThemeData with Diagnosticable { ...@@ -610,6 +622,10 @@ class ThemeData with Diagnosticable {
required this.radioTheme, required this.radioTheme,
required this.switchTheme, required this.switchTheme,
required this.fixTextFieldOutlineLabel, required this.fixTextFieldOutlineLabel,
@Deprecated(
'No longer used by the framework, please remove any reference to it. '
'This feature was deprecated after v1.23.0-4.0.pre.'
)
required this.useTextSelectionTheme, required this.useTextSelectionTheme,
}) : assert(visualDensity != null), }) : assert(visualDensity != null),
assert(primaryColor != null), assert(primaryColor != null),
...@@ -932,21 +948,21 @@ class ThemeData with Diagnosticable { ...@@ -932,21 +948,21 @@ class ThemeData with Diagnosticable {
/// The color of text selections in text fields, such as [TextField]. /// The color of text selections in text fields, such as [TextField].
@Deprecated( @Deprecated(
'Use TextSelectionThemeData.selectionColor instead. ' 'Use TextSelectionThemeData.selectionColor instead. '
'This feature was deprecated after v1.23.0-4.0.pre.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
final Color textSelectionColor; final Color textSelectionColor;
/// The color of cursors in Material-style text fields, such as [TextField]. /// The color of cursors in Material-style text fields, such as [TextField].
@Deprecated( @Deprecated(
'Use TextSelectionThemeData.cursorColor instead. ' 'Use TextSelectionThemeData.cursorColor instead. '
'This feature was deprecated after v1.23.0-4.0.pre.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
final Color cursorColor; final Color cursorColor;
/// The color of the handles used to adjust what part of the text is currently selected. /// The color of the handles used to adjust what part of the text is currently selected.
@Deprecated( @Deprecated(
'Use TextSelectionThemeData.selectionHandleColor instead. ' 'Use TextSelectionThemeData.selectionHandleColor instead. '
'This feature was deprecated after v1.23.0-4.0.pre.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
final Color textSelectionHandleColor; final Color textSelectionHandleColor;
...@@ -1241,17 +1257,17 @@ class ThemeData with Diagnosticable { ...@@ -1241,17 +1257,17 @@ class ThemeData with Diagnosticable {
Color? secondaryHeaderColor, Color? secondaryHeaderColor,
@Deprecated( @Deprecated(
'Use TextSelectionThemeData.selectionColor instead. ' 'Use TextSelectionThemeData.selectionColor instead. '
'This feature was deprecated after v1.23.0-4.0.pre.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
Color? textSelectionColor, Color? textSelectionColor,
@Deprecated( @Deprecated(
'Use TextSelectionThemeData.cursorColor instead. ' 'Use TextSelectionThemeData.cursorColor instead. '
'This feature was deprecated after v1.23.0-4.0.pre.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
Color? cursorColor, Color? cursorColor,
@Deprecated( @Deprecated(
'Use TextSelectionThemeData.selectionHandleColor instead. ' 'Use TextSelectionThemeData.selectionHandleColor instead. '
'This feature was deprecated after v1.23.0-4.0.pre.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
Color? textSelectionHandleColor, Color? textSelectionHandleColor,
Color? backgroundColor, Color? backgroundColor,
......
...@@ -152,10 +152,14 @@ class TapSemanticEvent extends SemanticsEvent { ...@@ -152,10 +152,14 @@ class TapSemanticEvent extends SemanticsEvent {
/// ///
@Deprecated( @Deprecated(
'This event has never been implemented and will be removed in a future version of Flutter. References to it should be removed. ' 'This event has never been implemented and will be removed in a future version of Flutter. References to it should be removed. '
'This feature was deprecated after v1.12.16.' 'This feature was deprecated after v1.26.0-18.0.pre.'
) )
class UpdateLiveRegionEvent extends SemanticsEvent { class UpdateLiveRegionEvent extends SemanticsEvent {
/// Creates a new [UpdateLiveRegionEvent]. /// Creates a new [UpdateLiveRegionEvent].
@Deprecated(
'This event has never been implemented and will be removed in a future version of Flutter. References to it should be removed. '
'This feature was deprecated after v1.26.0-18.0.pre.'
)
const UpdateLiveRegionEvent() : super('updateLiveRegion'); const UpdateLiveRegionEvent() : super('updateLiveRegion');
@override @override
......
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