After setting up all the .json files, pubspec file and initialization in the main method when I am trying to create the codegen_loader.g.dart file from the terminal by invoking flutter pub run easy_localization:generate, it's not getting through. Even no error message is getting.
Below is a snippet of the command line:
PS C:\Users\Prosanto\Desktop\Android Dev\localization> flutter pub run easy_localization:generate -h
PS C:\Users\Prosanto\Desktop\Android Dev\localization> flutter pub run easy_localization:generate -S "assets/translations" -O "lib/translations"
PS C:\Users\Prosanto\Desktop\Android Dev\localization>
Nothing is happening, any help or suggestion is highly helpful.
I dealt with this same issue on Mac, but these steps should still help.
First, I ran this command from the Mac terminal, not from Android Studio (whether that made any difference, who knows, but it wasn't working when running from the IDE). It's different from the easy_localization docs
flutter pub run easy_localization:generate --source-dir assets/translations
After that, I ran this command:
flutter pub run easy_localization:generate -S assets/translations -f keys -o locale_keys.g.dart
And the necessary files were generated as expected. I hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With