-
Notifications
You must be signed in to change notification settings - Fork 27.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecated obsolete Material classes: FlatButton, RaisedButton, OutlineButton #73352
Deprecated obsolete Material classes: FlatButton, RaisedButton, OutlineButton #73352
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -108,6 +108,10 @@ import 'theme_data.dart'; | |||
/// * [RawMaterialButton], the widget this widget is based on. | |||
/// * <https://material.io/design/components/buttons.html> | |||
/// * Cookbook: [Build a form with validation](https://flutter.dev/docs/cookbook/forms/validation) | |||
@Deprecated( | |||
'Use TextButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). ' | |||
'This feature was deprecated after 1.25.0-8.1.pre' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'This feature was deprecated after 1.25.0-8.1.pre' | |
'This feature was deprecated after v1.25.0-8.1.pre.' |
Here and below, I think this is the format the linter is looking for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, hopefully I've finally got it.
ddf3d08
to
2d79ced
Compare
bf02b74
to
3f404b5
Compare
3f404b5
to
865d41b
Compare
This PR deprecates three obsolete Material button classes: FlatButton, RaisedButton, OutlineButton. It does not (yet) deprecate the obsolete ButtonTheme and ButtonThemeData classes because there's one remaining reference in _DropDownButtonState. The ButtonTheme classes will be deprecated shortly.
FlatButton, RaisedButton, and OutlineButton have been replaced by TextButton, ElevatedButton, and OutlinedButton respectively. ButtonTheme has been replaced by TextButtonTheme, ElevatedButtonTheme, and OutlinedButtonTheme. The original classes will eventually be removed, please migrate code that uses them. There's a detailed migration guide for the new button and button theme classes in flutter.dev/go/material-button-migration-guide.