Migrate from easy_localization¶
This is the fastest path if your project currently uses easy_localization.
Phase 1: convert translation assets¶
If your project uses the default folder layout:
If your translations live somewhere else:
Supported source formats:
- JSON
- YAML / YML
- CSV
The command normalizes output into assets/lang/<locale>.json.
Phase 2: migrate Dart callsites¶
Dry run:
Apply changes:
Update tests too:
What gets rewritten¶
'key'.tr()tr('key')Text('key').tr()- plural lookups
context.setLocale(...)
Follow-up¶
After migration:
Detailed guide¶
For the longer guide, see the repo migration doc.