flutter_localizations:
sdk: flutter
Flutter 在使用复制粘贴的时候出现问题。主要是在项目中使用了国际化的插件flutter_localizations 并且在MaterialApp 中申明了localizationsDelegates和supportedLocales,而且在supportedLocales中申明了const Locale('zh','CN'),然而插件包中,没有对应的支持,导致的报错。

解决方案:




最后在main.dart文件里进行配置,

完美解决错误。
网友评论