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

Add RelativeRect.fromDirectional factory #107059

Merged
merged 1 commit into from Jul 7, 2022
Merged

Add RelativeRect.fromDirectional factory #107059

merged 1 commit into from Jul 7, 2022

Conversation

kseino
Copy link
Contributor

@kseino kseino commented Jul 4, 2022

Added fromDirectional factory to RelativeRect.

When we need to consider both TextDirection.ltr and TextDirection.rtl, this will help us.

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

List which issues are fixed by this PR. You must list at least one issue.
#107058

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Jul 4, 2022
@google-cla
Copy link

google-cla bot commented Jul 4, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@kseino kseino changed the title Add RelativeRect.fromDirectional factory Add RelativeRect.fromDirectional factory Jul 4, 2022
Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@youssef-attia youssef-attia left a comment

Choose a reason for hiding this comment

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

LGTM

@loic-sharma loic-sharma merged commit 41405ff into flutter:master Jul 7, 2022
@loic-sharma
Copy link
Member

Thanks for the contribution! :)

@kseino kseino deleted the add-relative-rect-from-directional branch July 8, 2022 01:15
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 8, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jul 8, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jul 8, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jul 8, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jul 8, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jul 9, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jul 9, 2022
camsim99 pushed a commit to camsim99/flutter that referenced this pull request Aug 10, 2022
Add `fromDirectional` factory to `RelativeRect` for when an app needs to consider both TextDirection.ltr and TextDirection.rtl.

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

Addresses flutter#107058.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants