Skip to content

Commit 49939c9

Browse files
[docs] Make Border.symmetric docs more explicit about their arguments (flutter#193222)
This PR updates the docs for `Border.symmetric` / `BoxBorder.symmetric` to explicitly state that it refers to the argument names as the logical draw order on the canvas, instead of positional placement. (like EdgeInsets.symmetric) Fixes flutter#193094 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant in-code documentation (doc comments with `///`). - [x] If this PR introduces a new feature or capability, I created and linked a website documentation issue or PR in [flutter/website] (or verified none is needed). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [flutter/website]: https://github.com/flutter/website [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
1 parent 4db99a7 commit 49939c9

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎packages/flutter/lib/src/painting/box_border.dart‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ abstract class BoxBorder extends ShapeBorder {
9090

9191
/// Creates a [Border] with symmetrical vertical and horizontal sides.
9292
///
93-
/// The `vertical` argument applies to the [Border.left] and [Border.right]
94-
/// sides, and the `horizontal` argument applies to the [Border.top] and
95-
/// [Border.bottom] sides.
93+
/// The `vertical` argument refers to the vertical sides ([Border.left] and
94+
/// [Border.right]), and the `horizontal` argument refers to the horizontal
95+
/// sides ([Border.top] and [Border.bottom]).
9696
///
9797
/// All arguments default to [BorderSide.none].
9898
const factory BoxBorder.symmetric({BorderSide vertical, BorderSide horizontal}) =
@@ -446,8 +446,8 @@ class Border extends BoxBorder {
446446

447447
/// Creates a border with symmetrical vertical and horizontal sides.
448448
///
449-
/// The `vertical` argument applies to the [left] and [right] sides, and the
450-
/// `horizontal` argument applies to the [top] and [bottom] sides.
449+
/// The `vertical` argument refers to the vertical sides ([left] and [right]),
450+
/// and the `horizontal` argument refers to the horizontal sides ([top] and [bottom]).
451451
///
452452
/// All arguments default to [BorderSide.none].
453453
const Border.symmetric({

0 commit comments

Comments
 (0)