Open mbfakourii opened 10 months ago
Have you tried using Directionality
widget as below? I checked it can make this works as expected.
Directionality(
textDirection: TextDirection.rtl,
child: Markdown(
data: 'مرحبا بالعالم',
),
),
Have you tried using
Directionality
widget as below? I checked it can make this works as expected.Directionality( textDirection: TextDirection.rtl, child: Markdown( data: 'مرحبا بالعالم', ), ),
The output of this code is as follows:
Directionality(
textDirection: TextDirection.rtl,
child: Markdown(
data: '''
# Title
This is atest
## Title 2
This is a test
https://github.com
این تست است این تست است
این تست است این تست است
# Title
This is atest''',
),
),
English sentences are expected to be on the left and Persian on the right!
Currently, Markdown.data is a String only. This means that there needs to be the ability to automatically detect RTL text in the source string (which seems similar to https://github.com/flutter/flutter/issues/23881).
I'm not sure if it's feasible currently. Labeling the issue for other's ideas.
Is there an existing issue for this?
Use case
RTL is not supported in
flutter_markdown
.Proposal
Github site supports this Feature:
But
flutter_markdown
is not support:Example code:
I suggest adding this feature.