Open dgt-erik opened 1 year ago
Hi @dgt-erik,
As of version 1.19.0
, the logic for deciding which version of the code generator (the intl_utils
package) to use has been changed.
The Flutter Intl >=1.19.0
extension checks:
intl_utils
package is specified as a dev dependency or dependency within the pubspec.yaml
file, and use the same version if it is.intl_utils
package is already globally activated, and use that version if it is.intl_utils
package if nothing above is satisfied.Fix: Decide which version of the intl_utils
package you want to use and specify it as a dev dependency or just globally activate that concrete version (e.g. flutter pub global activate intl_utils 2.8.1
).
To check globally activated packages, run flutter pub global list
.
Hope it helps!
A better approach for this is to set the intl_utils version in the pubspec.yml file (under dev dependencies), so everyone in the project will have the same version no matter which global version they have set.
Don't forget to run a flutter pub get
after adding the dependency!
After that, delete the intl generated folder an re-generate it.
Hope it works for you!
Describe the bug Me and a collegue have the same IDE, same extentions and versions installed. But Flutter intl generates different code in messages_all.dart
This is the code difference: Generated by my collegue:
Generated by me:
we both constantly push the changes to git when generating / adding keys. It is annoying because it generated more code changed then necessary.
This behavior changed and disappeared after i executed flutter Intl: Initialize. The difference, he added Intl, i did not. I cloned the repo and executed flutter pub get. and used "saving pubspec.yaml" to generate the files.
To Reproduce