Skip to content

Add AlignmentDirectional constants to AlignmentGeometry #176543

@PiotrRogulski

Description

@PiotrRogulski

Use case

The AlignmentGeometry class now contains redirecting constants like center or topLeft to allow the usage of dot shorthands:

Align(
  alignment: .topLeft,
  child: Foo(),
),

However, the predefined values for directional alignment (like topStart) are missing from the AlignmentGeometry class:

Align(
  // cannot use a dot shorthand
  alignment: AlignmentDirectional.topStart,
  child: Foo(),
),

Proposal

Add the corresponding constants into AlignmentDirectional to enable dot shorthands for them as well:

Align(
  alignment: .topStart,
  child: Foo(),
),

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.r: solvedIssue is closed as solvedteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions