Closed iMajeed16 closed 2 years ago
Doesn't work. Seems to be displaying the text on the left even when setting TextDirection.rtl
Doesn't work. Seems to be displaying the text on the left even when setting
TextDirection.ltr
Did you mean TextDirection.rtl
?. ltr it would be for the text from left to right and thus it will be on the left side.
Check this example .
Doesn't work. Seems to be displaying the text on the left even when setting
TextDirection.ltr
Did you mean
TextDirection.rtl
?. ltr it would be for the text from left to right and thus it will be on the left side.Check this example .
Yes sorry, I've edited my comment. It does not work when setting TextDirection.rtl
. The Text still appears on the left side
Yes sorry, I've edited my comment. It does not work when setting
TextDirection.rtl
. The Text still appears on the left side
Could you please provide me some code?
Yes sorry, I've edited my comment. It does not work when setting
TextDirection.rtl
. The Text still appears on the left sideCould you please provide me some code?
Of course:
Flushbar(
title: 'My title',
message: 'My message',
backgroundColor: Colors.red,
titleColor: Colors.white,
messageColor: Colors.white,
borderRadius: BorderRadius.circular(25),
flushbarPosition: FlushbarPosition.TOP,
textDirection: TextDirection.rtl,
onTap: (_) {
print('Tapped');
},
animationDuration: const Duration(milliseconds: 500),
duration: const Duration(seconds: 3),
)..show(context);
Of course:
Flushbar( title: 'My title', message: 'My message', backgroundColor: Colors.red, titleColor: Colors.white, messageColor: Colors.white, borderRadius: BorderRadius.circular(25), flushbarPosition: FlushbarPosition.TOP, textDirection: TextDirection.rtl, onTap: (_) { print('Tapped'); }, animationDuration: const Duration(milliseconds: 500), duration: const Duration(seconds: 3), )..show(context);
After some testing if the app language is in a language that is left to right it would show it in that way even if you added TextDirection.rtl
. and it depends of that.
To be clear this is only effect the indicator (the left bar) to be showed on the right if you set it to TextDirection.rtl
.
Of course:
Flushbar( title: 'My title', message: 'My message', backgroundColor: Colors.red, titleColor: Colors.white, messageColor: Colors.white, borderRadius: BorderRadius.circular(25), flushbarPosition: FlushbarPosition.TOP, textDirection: TextDirection.rtl, onTap: (_) { print('Tapped'); }, animationDuration: const Duration(milliseconds: 500), duration: const Duration(seconds: 3), )..show(context);
After some testing if the app language is in a language that is left to right it would show it in that way even if you added
TextDirection.rtl
. and it depends of that.To be clear this is only effect the indicator (the left bar) to be showed on the right if you set it to
TextDirection.rtl
.
So what is the solution for presenting the alert's text as RTL?
textDirection
added for rtl languages.textDirection
by default would beTextDirection.ltr
.