Audit and update deprecation warnings (#75813)
This commit is contained in:
@@ -69,12 +69,16 @@ const _DayPickerGridDelegate _kDayPickerGridDelegate = _DayPickerGridDelegate();
|
||||
///
|
||||
@Deprecated(
|
||||
'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 {
|
||||
/// Creates a day picker.
|
||||
///
|
||||
/// 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({
|
||||
Key? key,
|
||||
required this.selectedDate,
|
||||
@@ -351,13 +355,17 @@ class DayPicker extends StatelessWidget {
|
||||
///
|
||||
@Deprecated(
|
||||
'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 {
|
||||
/// Creates a month picker.
|
||||
///
|
||||
/// Rarely used directly. Instead, typically used as part of the dialog shown
|
||||
/// by [showDatePicker].
|
||||
@Deprecated(
|
||||
'Use CalendarDatePicker instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
)
|
||||
MonthPicker({
|
||||
Key? key,
|
||||
required this.selectedDate,
|
||||
|
||||
@@ -25,12 +25,16 @@ import 'theme_data.dart';
|
||||
/// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide).
|
||||
@Deprecated(
|
||||
'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 {
|
||||
/// Create a simple text button.
|
||||
///
|
||||
/// 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({
|
||||
Key? key,
|
||||
required VoidCallback? onPressed,
|
||||
|
||||
@@ -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).
|
||||
@Deprecated(
|
||||
'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 {
|
||||
/// Create an outline button.
|
||||
///
|
||||
/// The [highlightElevation] argument must be null or a positive value
|
||||
/// 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({
|
||||
Key? key,
|
||||
required VoidCallback? onPressed,
|
||||
|
||||
@@ -26,7 +26,7 @@ import 'theme_data.dart';
|
||||
/// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide).
|
||||
@Deprecated(
|
||||
'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 {
|
||||
/// Create a filled button.
|
||||
@@ -35,6 +35,10 @@ class RaisedButton extends MaterialButton {
|
||||
/// Additionally, [elevation], [hoverElevation], [focusElevation],
|
||||
/// [highlightElevation], and [disabledElevation] must be non-negative, if
|
||||
/// 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({
|
||||
Key? key,
|
||||
required VoidCallback? onPressed,
|
||||
|
||||
@@ -1486,7 +1486,13 @@ abstract class BaseSliderTrackShape {
|
||||
/// * [RoundedRectSliderTrackShape], for a similar track with rounded edges.
|
||||
class RectangularSliderTrackShape extends SliderTrackShape with BaseSliderTrackShape {
|
||||
/// 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.
|
||||
///
|
||||
@@ -1496,7 +1502,7 @@ class RectangularSliderTrackShape extends SliderTrackShape with BaseSliderTrackS
|
||||
/// thumb radius.
|
||||
@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.5.7.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
)
|
||||
final double disabledThumbGapWidth;
|
||||
|
||||
|
||||
@@ -240,17 +240,17 @@ class ThemeData with Diagnosticable {
|
||||
Color? secondaryHeaderColor,
|
||||
@Deprecated(
|
||||
'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,
|
||||
@Deprecated(
|
||||
'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,
|
||||
@Deprecated(
|
||||
'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? backgroundColor,
|
||||
@@ -559,8 +559,20 @@ class ThemeData with Diagnosticable {
|
||||
required this.buttonColor,
|
||||
required this.toggleButtonsTheme,
|
||||
required this.secondaryHeaderColor,
|
||||
@Deprecated(
|
||||
'Use TextSelectionThemeData.selectionColor instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
)
|
||||
required this.textSelectionColor,
|
||||
@Deprecated(
|
||||
'Use TextSelectionThemeData.cursorColor instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
)
|
||||
required this.cursorColor,
|
||||
@Deprecated(
|
||||
'Use TextSelectionThemeData.selectionHandleColor instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
)
|
||||
required this.textSelectionHandleColor,
|
||||
required this.backgroundColor,
|
||||
required this.dialogBackgroundColor,
|
||||
@@ -610,6 +622,10 @@ class ThemeData with Diagnosticable {
|
||||
required this.radioTheme,
|
||||
required this.switchTheme,
|
||||
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,
|
||||
}) : assert(visualDensity != null),
|
||||
assert(primaryColor != null),
|
||||
@@ -932,21 +948,21 @@ class ThemeData with Diagnosticable {
|
||||
/// The color of text selections in text fields, such as [TextField].
|
||||
@Deprecated(
|
||||
'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;
|
||||
|
||||
/// The color of cursors in Material-style text fields, such as [TextField].
|
||||
@Deprecated(
|
||||
'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;
|
||||
|
||||
/// The color of the handles used to adjust what part of the text is currently selected.
|
||||
@Deprecated(
|
||||
'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;
|
||||
|
||||
@@ -1241,17 +1257,17 @@ class ThemeData with Diagnosticable {
|
||||
Color? secondaryHeaderColor,
|
||||
@Deprecated(
|
||||
'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,
|
||||
@Deprecated(
|
||||
'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,
|
||||
@Deprecated(
|
||||
'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? backgroundColor,
|
||||
|
||||
@@ -152,10 +152,14 @@ class TapSemanticEvent extends SemanticsEvent {
|
||||
///
|
||||
@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.12.16.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
)
|
||||
class UpdateLiveRegionEvent extends SemanticsEvent {
|
||||
/// 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');
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user