-
-
Notifications
You must be signed in to change notification settings - Fork 222
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 RTL support (Bidi) #1239
base: main
Are you sure you want to change the base?
Add RTL support (Bidi) #1239
Conversation
This will be used to control the direction of text elements depending on the content. We use `intl` to either add unicode characters to fix the display, or to know which TextDirection it should use (to be used when displaying HTML). `AutoDirection` is used for dynamic content, such as TextField to change the direction based on the input text. Signed-off-by: Amjad Alsharafi <[email protected]>
Use the `utils/text_direction.dart` functions to: - convert text Strings into a version that may contain unicode characters to change the direction of the text. - control how to display HTML based on the text direction based on the content - control the direction of TextField dynamically based on the written content. Signed-off-by: Amjad Alsharafi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, but this Pull Requests currently adds too much complexity, which I cannot maintain in the long term
@@ -33,7 +34,7 @@ class ChatAppBarListTile extends StatelessWidget { | |||
child: Padding( | |||
padding: const EdgeInsets.symmetric(horizontal: 4.0), | |||
child: Linkify( | |||
text: title, | |||
text: title.bidiFormatted, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now every time I want to add a text somewhere, I need to think about adding the .bidiFormatted
suffix? I would prefer a solution, which does not add more complexity
Thanks @krille-chan for the review. You are right, I think a better solution is needed here. let me see what can be done to improve this. |
Add Bidi support identification for text elements and dynamically change the direction of the text.
Fixes #63
Please make sure that your Pull Request meet the following acceptance criteria:
dart format lib/ test/
anddart run import_sorter:main --no-comments
Pull Request has been tested on: