1.在 pubspec.yaml 中集成 flutter_localizations; dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter 2.在 MaterialApp 中设置本地化代理和支持的语言类型; return MaterialApp( localizationsDelegates: [ GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, ], supportedLocales: [ const Locale(‘zh‘, ‘CN‘), const Locale(‘en‘, ‘US‘), ] }