Skip to content

Proposal for cleaning up button APIs #63510

@Hixie

Description

@Hixie

We currently have the following button classes: ButtonStyleButton, ContainedButton, ElevatedButton, FlatButton, MaterialButton, OutlineButton, OutlinedButton, RaisedButton, RawMaterialButton, and TextButton.

My understanding is that the best practice is to use OutlinedButton, ElevatedButton, and TextButton, and use ButtonStyleButton for custom buttons.

I propose that we deprecate OutlineButton, RaisedButton, ContainedButton, FlatButton, MaterialButton, and RawMaterialButton, each with a pointer to the relevant class, and that we update the documentation for OutlinedButton, ElevatedButton, TextButton, and ButtonStyleButton to all include sample code, and that we remove the detailed documentation from the deprecated classes to clearly indicate which are the preferred classes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work listcustomer: productf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions