实际上我正在使用Arb文件进行本地化,但我不知道如何在Flutter的.arb文件中创建和访问数组类型值。
"months": "january:february:march:april:may:june:july:august:september:october:november:december",
"@months": {
"description": "months"
},
然后,将字符串拆分为数组:
String monthsString = AppLocalizations.of(context)!.months;
List<String> months = monthsString.split(':');
intl
插件,它将处理所有自动化代码生成过程。 - towhid