flutter_gen
flutter_gen copied to clipboard
[BUG]: dont gen localization from .arb file
Is there an existing issue for this?
- [x] I have searched the existing issues
Version
No response
Command type
build_runner (Default)
What happened?
Not gen l10n with cmd:
dart run build_runner build
l10n.yaml
arb-dir: l10n
template-arb-file: app_vi.arb
preferred-supported-locales: [vi]
output-dir: lib/generated/l10n
output-localization-file: app_localization.dart
output-class: AppLocalization
nullable-getter: false
synthetic-package: false
flutter:
uses-material-design: true
generate: true
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.24.3, on macOS 15.0.1 24A348 darwin-arm64, locale en-VN)
Relevant a pubspec.yaml.
dev_dependencies:
build_runner: ^2.4.11
flutter_lints: ^4.0.0
flutter_gen_runner: ^5.7.0
freezed: ^2.5.2
json_serializable: ^6.8.0
retrofit_generator: ^9.1.2
injectable_generator: ^2.6.2
melos: ^6.2.0
flutter:
uses-material-design: true
generate: true
assets:
- assets/image/
- assets/icon/
flutter_gen:
line_length: 250
output: lib/generated/
assets:
outputs:
package_parameter_enabled: false
class_name: AppAsset
integrations:
flutter_svg: true
Relevant log output
Building package executable... (3.1s)
Built build_runner:build_runner.
[INFO] Generating build script completed, took 201ms
FlutterGen v5.8.0 Loading ...
Reading FlutterGen options from pubspec.yaml
[WARNING] Throwing away cached asset graph because the language version of some package(s) changed. This would most commonly happen when updating dependencies or changing your min sdk constraint.
[INFO] Cleaning up outputs from previous builds. completed, took 125ms
[INFO] Generating build script completed, took 53ms
[WARNING] Invalidated precompiled build script due to missing asset graph.
[INFO] Precompiling build script... completed, took 4.0s
FlutterGen v5.8.0 Loading ...
Reading FlutterGen options from pubspec.yaml
[INFO] Building new asset graph completed, took 964ms
[INFO] Checking for unexpected pre-existing outputs. completed, took 0ms
[WARNING] injectable_generator:injectable_config_builder on lib/main.dart:
Missing dependencies in demo_mix/main.dart
[NetworkConfig] depends on unregistered type [LocalRepository] from package:demo_mix/repository/local_repository.dart
Did you forget to annotate the above class(s) or their implementation with @injectable?
or add the right environment keys?
------------------------------------------------------------------------
Generated: lib/generated/assets.gen.dart
FlutterGen finished.
[INFO] Running build completed, took 16.3s
[INFO] Caching finalized dependency graph completed, took 69ms
[INFO] Succeeded after 16.3s with 148 outputs (986 actions)
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Why is the issue related to the library?
I closed this topic. I will be follow this link. https://docs.flutter.dev/ui/accessibility-and-internationalization/internationalization