telereso_generator 0.0.5-alpha telereso_generator: ^0.0.5-alpha copied to clipboard
Genrate wrapper for your Intl implemntation .
telereso_generator #
Builder for Telereso to support l10n localization
Usage #
-
Add
telereso_generator
to yourpubspec.yaml
as dev_dependency. Make sure build_runner is also listed as development dependency.dev_dependencies: build_runner: ^1.0.0 telereso_generator: ^0.0.5-alpha
-
Run flutter
pub get
. -
Add
build.yaml
in your project's root (next to l10n.yaml)targets: $default: builders: telereso_generator|telereso: enabled: true options: template-arb-file: intl_en.arb output-localization-file: app_localizations.dart output-class: AppLocalizations output-class-remote: RemoteLocalizations
- Notice that first 3 options are the same as your l10n.yaml file, these flags has to be the same and required
output-class-remote
is the name of your new wrapper class, if not set it will beRemoteLocalizationsDefault
- Build!
Or watch for auto updateflutter pub run build_runner build --delete-conflicting-outputs
flutter pub run build_runner watch --delete-conflicting-outputs
- A file will be generated with the same structure as your old localization class, you just have to use the new one in your app.