telereso_generator 0.0.10-alpha
telereso_generator: ^0.0.10-alpha copied to clipboard
Telereso implemntation to generate wrapper for your Intl implemntation .
telereso_generator #
Builder for Telereso to support l10n localization
Usage #
-
Add
telereso_generatorto yourpubspec.yamlas dev_dependency. Make sure build_runner is also listed as development dependency.dev_dependencies: build_runner: ^1.0.0 telereso_generator: ^0.0.10-alpha -
Run flutter
pub get. -
Add
build.yamlin 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-remoteis 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-outputsflutter 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.