deprecated consistency (#75903)

This commit is contained in:
Alexandre Ardhuin 2021-02-17 19:21:02 +01:00 committed by GitHub
parent cf72a21aa5
commit b54d72cf66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 3 deletions

View File

@ -98,6 +98,10 @@ class FlatButton extends MaterialButton {
/// at the start, and 16 at the end, with an 8 pixel gap in between.
///
/// The [icon], [label], 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.'
)
factory FlatButton.icon({
Key? key,
required VoidCallback? onPressed,

View File

@ -107,6 +107,10 @@ class OutlineButton extends MaterialButton {
///
/// The [highlightElevation] argument must be null or a positive value. The
/// [icon], [label], [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.'
)
factory OutlineButton.icon({
Key? key,
required VoidCallback? onPressed,

View File

@ -116,6 +116,10 @@ class RaisedButton extends MaterialButton {
///
/// The [elevation], [highlightElevation], [disabledElevation], [icon],
/// [label], and [clipBehavior] arguments must not be null.
@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.'
)
factory RaisedButton.icon({
Key? key,
required VoidCallback? onPressed,

View File

@ -269,6 +269,10 @@ class GlobalObjectKey<T extends State<StatefulWidget>> extends GlobalKey<T> {
@optionalTypeArgs
class TypeMatcher<T> {
/// Creates a type matcher for the given type parameter.
@Deprecated(
'TypeMatcher has been deprecated because it is no longer used in framework(only in deprecated methods). '
'This feature was deprecated after v1.12.1.'
)
const TypeMatcher();
/// Returns true if the given object is of type `T`.

View File

@ -189,16 +189,20 @@ class Registrar extends BinaryMessenger {
/// as part of a simplification of the web plugins API.
@Deprecated(
'Use Registrar instead. '
'This feature was deprecated after v1.24.0-7.0.pre.'
'This feature was deprecated after v1.26.0-18.0.pre.'
)
class PluginRegistry extends Registrar {
/// Creates a [Registrar].
///
/// The argument is ignored.
@Deprecated(
'Use Registrar instead. '
'This feature was deprecated after v1.26.0-18.0.pre.'
)
PluginRegistry([
@Deprecated(
'This argument is ignored. '
'This feature was deprecated after v1.24.0-7.0.pre.'
'This feature was deprecated after v1.26.0-18.0.pre.'
)
BinaryMessenger? binaryMessenger,
]) : super(); // ignore: avoid_unused_constructor_parameters
@ -206,7 +210,7 @@ class PluginRegistry extends Registrar {
/// Returns `this`. The argument is ignored.
@Deprecated(
'This method is redundant. It returns the object on which it is called. '
'This feature was deprecated after v1.24.0-7.0.pre.'
'This feature was deprecated after v1.26.0-18.0.pre.'
)
Registrar registrarFor(Type key) => this;
}