1.首先说一下,国内运行flutter pub run可能会卡住,所以需要配置一下pub源。
export PUB_HOSTED_URL=https://pub.flutter-io.cnexport FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
2.开始安排国际化,这里我们需要先安装一个插件
然后再yaml文件中添加国际化插件库
flutter_localizations: sdk: flutter
export PUB_HOSTED_URL=https://pub.flutter-io.cnexport FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
然后再yaml文件中添加国际化插件库
flutter_localizations: sdk: flutter