channdara / flutter_localization

BSD 3-Clause "New" or "Revised" License
10 stars 17 forks source link

when i restart app after i change the language, the currentLocale.languageCode returns the initLanguageCode value not the one that i've recently changed #15

Open youssefasultan opened 4 months ago

channdara commented 4 months ago

There is a small bit of delay in getting the last languageCode from currentLocale. To prevent a null value, it returns the default code from initLanguageCode first and followed by the latest languageCode.