Skip to content

Set the position of PositionedTransition using start and end #107058

@kseino

Description

@kseino

Use case

Positioned widget can be positioned using start and end with directional factory.

https://api.flutter.dev/flutter/widgets/Positioned/Positioned.directional.html

RelativeRectTween of PositionedTransition widget can only be set by left and right.
If we need to consider both TextDirection.ltr and TextDirection.rtl, code will be verbose.

https://api.flutter.dev/flutter/rendering/RelativeRect-class.html

Proposal

RelativeRect.fromDirectional would be great!

RelativeRect.fromDirectional(
    textDirection: TextDirection.rtl,
    start: 10.0,
    top: 20.0,
    end: 30.0,
    bottom: 40.0,
);

Metadata

Metadata

Assignees

No one assigned

    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 Flutterframeworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions