Custom assets loaders for Easy Localization package
- JSON (JsonAssetLoader)
- CSV (CsvAssetLoader)
- HTTP (HttpAssetLoader)
- XML (XmlAssetLoader, XmlSingleAssetLoader)
- Yaml (YamlAssetLoader, YamlSingleAssetLoader)
- FILE (FileAssetLoader)
- Add this to your package's pubspec.yaml file:
dependencies:
#Easy Localization main package
easy_localization: <last_version>
# stable version install from https://pub.dev/packages
easy_localization_loader: <last_version>
# Dev version install from git REPO
easy_localization_loader:
git: https://github.com/aissat/easy_localization_loader.git
- Change assetLoader and patch
...
void main(){
runApp(EasyLocalization(
child: MyApp(),
supportedLocales: [Locale('en', 'US'), Locale('ar', 'DZ')],
path: 'resources/langs/langs.csv',
assetLoader: CsvAssetLoader()
));
}
...
- All done!.