Skip to content
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

Merged

Conversation

HansMuller
Copy link
Contributor

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.

@flutter-dashboard flutter-dashboard bot added f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Jan 5, 2021
@google-cla google-cla bot added the cla: yes label Jan 5, 2021
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flutter_LGTM

The analyzer might need quelling. :)

@@ -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'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'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.

Copy link
Contributor Author

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.

@HansMuller HansMuller force-pushed the deprecate_obsolete_button_classes branch from 3f404b5 to 865d41b Compare January 8, 2021 19:29
@HansMuller HansMuller merged commit 9a43df5 into flutter:master Jan 8, 2021
@HansMuller HansMuller deleted the deprecate_obsolete_button_classes branch January 8, 2021 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants