6

is there a way to change the directory that contains all the generated files about localization? When I run the app they are automatically generated in .dart_tool/flutter_gen/gen_l10n and I want to change it.

(directory photo) https://i.stack.imgur.com/DjqHp.png

This is my l10n.yaml:

arb-dir: lib/l10n
template-arb-file: app_en.arb
output-localization-files: app_localizations.dart # auto generated
Trocco
  • 65
  • 4

2 Answers2

10

Need to add both output-dir and synthetic-package parameters.

This is my l10n.yaml

arb-dir: lib/l10n
template-arb-file: app_en.arb
output-localization-file: s.dart
output-class: S
output-dir: lib/l10n
synthetic-package: false

Run flutter gen-l10n to generate file

dante
  • 984
  • 3
  • 10
  • 24
1

Take a look to the output of:

flutter gen-l10n --help

Normally, you can put any of these parameters in l10n.yaml

I have not tried, tell me if it is ok !

I think output-dir parameter will help

Alaindeseine
  • 3,260
  • 1
  • 11
  • 21