提示错误内容如下:
The following message was thrown:
Warning: This application's locale, zh, is not supported by all of its localization delegates.
• A CupertinoLocalizations delegate that supports the zh locale was not found.
If the application is built using GlobalMaterialLocalizations.delegate, consider using GlobalMaterialLocalizations.delegates (plural) instead, as that will automatically declare the appropriate Cupertino localizations.
The declared supported locales for this app are: zh, en
See https://flutter.dev/tutorials/internationalization/ f
语言配置由
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
改为
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],