Why is Flutter not generating localization files?

245 views Asked by At

Whenever I try to run the following commands:

  • flutter pub run intl_utils:generate
  • flutter gen-l10n
  • flutter gen-l10n --template-arb-file=intl_en.arb

It is not able to generate the localization files, throwing an error even when I have created intl_en.arb and other language files as well.

INFO: No @@locale or _locale field found in intl_ar, assuming 'ar' based on the file name. INFO: No @@locale or _locale field found in intl_de, assuming 'de' based on the file name. INFO: No @@locale or _locale field found in intl_en, assuming 'en' based on the file name. INFO: No @@locale or _locale field found in intl_es, assuming 'es' based on the file name. INFO: No @@locale or _locale field found in intl_fr, assuming 'fr' based on the file name. INFO: No @@locale or _locale field found in intl_id, assuming 'id' based on the file name. INFO: No @@locale or _locale field found in intl_it, assuming 'it' based on the file name. INFO: No @@locale or _locale field found in intl_pt, assuming 'pt' based on the file name. INFO: No @@locale or _locale field found in intl_ro, assuming 'ro' based on the file name. INFO: No @@locale or _locale field found in intl_sw, assuming 'sw' based on the file name. INFO: No @@locale or _locale field found in intl_tr, assuming 'tr' based on the file name. ERROR: Failed to generate localization files. type 'Null' is not a subtype of type 'int' of 'index'

0

There are 0 answers