Skip to content

Proposal to add iconAlignment to ButtonStyle #153350

@kay4ik

Description

@kay4ik

Use case

With the Button.icon() constructor we have the possibility to set the icon at the start or end of the Button with iconAlignment.

It should also be possible to set the iconAlignment inside the ThemeData for the whole app. That way we only have to set the iconAlignment once.

Proposal

Example with TextButton.icon():

ThemeData(
  textButtonTheme: TextButtonThemeData(
    style: ButtonStyle(
      iconAlignment: IconAlignment.end,
//    [...]
    ),
  ),
);

By adding the property to the ButtonStyle class we can use it on all buttons. I think that is a huge benefit for everyone using this Feature!

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions