flutter国际化
1.引入插件
flutter_cupertino_localizations
2. 在 MaterialApp 添加
locale: const Locale('zh', 'CH'),localizationsDelegates: const [GlobalCupertinoLocalizations.delegate,GlobalMaterialLocalizations.delegate,GlobalWidgetsLocalizations.delegate,],supportedLocales: const [Locale('zh', 'CH'),Locale('en', 'US'),],
注意:
import 'package:flutter_localizations/flutter_localizations.dart';
如果觉得《flutter 输入框复制粘贴英文转中文》对你有帮助,请点赞、收藏,并留下你的观点哦!