美文网首页
flutter国际化未自动生成

flutter国际化未自动生成

作者: 王冥 | 来源:发表于2025-02-25 10:20 被阅读0次

运行指令 flutter --no-color pub global run intl_utils:generate 查看日志
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_zh, assuming 'zh' based on the file name.
类似这样基本就生成在了dart文件里

问题:主要是我们在.arb文件中添加了对应字符串,我们却调用不到,应该就是没有在dart中生成相应变量,一般安装插件之后都会自动生成,如果没有自动生成就运行一下上面的命令,执行一下intl_utils:generate就会生成
注:如果提示没有intl_utils指令,就运行flutter pub global activate intl_utils 安装激活

相关文章

网友评论

      本文标题:flutter国际化未自动生成

      本文链接:https://www.haomeiwen.com/subject/ltigpjtx.html