内置组件本地化
-
添加依赖
Flutter默认组件的本地化只需要添加
flutter_localizations: sdk: flutter
使用命令行添加就是
flutter pub add flutter_localizations --sdk=flutter
-
修改入口组件 main.dart
import 'package:flutter_localizations/flutter_localizations.dart';
return const MaterialApp( title: 'Localizations Sample App', localizationsDelegates...