load an asset error
Closed this issue · 1 comments
Error while trying to load an asset: Failed to load asset at "assets/assets/i18n/zh_CN.json" (404) Error while trying to load an asset: Failed to load asset at "assets/assets/i18n/zh_CN.xml" (404) Error while trying to load an asset: Failed to load asset at "assets/assets/i18n/zh_CN.toml" (404) Error while trying to load an asset: Failed to load asset at "assets/assets/i18n/zh_CN.json" (404) Error while trying to load an asset: Failed to load asset at "assets/assets/i18n/zh_CN.xml" (404) Error while trying to load an asset: Failed to load asset at "assets/assets/i18n/zh_CN.toml" (404)
each time I refreshed pages, I got these errors. but I have already had "zh_CN.yaml" in my assets folders and it works.
If you are using only yaml files and you want to suppress these messages, you must use the decodeStrategies
parameter.
Take a look here
https://github.com/ilteoood/flutter_i18n/blob/master/lib/loaders/file_translation_loader.dart#L27