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

ButtonBar RTL docs clarification #24264

Merged
merged 1 commit into from
Nov 13, 2018
Merged

Conversation

justinmc
Copy link
Contributor

Closes #23217

@justinmc justinmc self-assigned this Nov 13, 2018
@justinmc
Copy link
Contributor Author

@HansMuller Let me know if this is a good place for this line, or if there is anything else I can add to clarify.

Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

Just some wordsmithing.

@@ -12,7 +12,8 @@ import 'raised_button.dart';
/// A horizontal arrangement of buttons.
Copy link
Contributor

Choose a reason for hiding this comment

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

An end-aligned row of buttons.

@@ -12,7 +12,8 @@ import 'raised_button.dart';
/// A horizontal arrangement of buttons.
///
/// Places the buttons horizontally according to the padding in the current
/// [ButtonTheme].
/// [ButtonTheme]. Alignment and order of children are reversed between RTL and
Copy link
Contributor

@HansMuller HansMuller Nov 13, 2018

Choose a reason for hiding this comment

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

It might be best to be more specific here (since in one sense the Row's "alignment" doesn't change, it's always MainAxisAlignment.end).

The children are laid out in a [Row] with [MainAxisAlignment.end]. When the [Directionality] is [TextDirection.ltr] the button bar's children are right justified and the last child becomes the rightmost child. When the [Directionality] [TextDirection.rtl] the children are left justified and the last child becomes the leftmost child.

@justinmc
Copy link
Contributor Author

@HansMuller Updated with your comments.

Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

LGTM

@justinmc justinmc merged commit 1fde4d0 into flutter:master Nov 13, 2018
@justinmc justinmc deleted the button-bar-rtl branch November 13, 2018 17:46
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ButtonBar children direction is not correct when RTL
3 participants