msayed-net / localize_and_translate

Flutter localization in easy steps
MIT License
52 stars 22 forks source link

Text direction doesnt get updated when changing app locale with setLanguage() #16

Closed real-john-doe closed 3 years ago

real-john-doe commented 3 years ago

The app should be killed and restarted again after changing language with setLanguage() for the text direction to update(RTL ,LTR). The restart filed does restart the app and updates text but doesn't update text direction

msayed-net commented 3 years ago

Can you provide output of the terminal command flutter doctor -v !

real-john-doe commented 3 years ago

Here you are : Flutter (Channel stable, 1.22.6, on Microsoft Windows [Version 10.0.19041.804], locale en-US) • Flutter version 1.22.6 at C:\flutter • Framework revision 9b2d32b605 (6 weeks ago), 2021-01-22 14:36:39 -0800 • Engine revision 2f0af37152 • Dart version 2.10.5

real-john-doe commented 3 years ago

Found the issue.I had put LocalizedApp parent of MaterialApp instead of MyApp.By correcting it, it works flawless.

msayed-net commented 3 years ago

Thanks for sharing the solution.