context: context,
applicationIcon: Image.asset(
‘images/flutter.png’,
height: 60,
width: 60,
),
applicationName: ‘应用程序’,
applicationVersion: ‘1.0.0’,
applicationLegalese: ‘copyright© 测试示例’,
children: [],
);
})
效果图
2.4 国际化
说明
-
VIEW LICENSES 和COLSE是showAboutDialog自动添加的
-
没有添加国际化之前显示的是默认的语言,要显示成中文时,需要添加国际化支持
国际化操作
- 在
pubspec.yaml
中配置支持国际化
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
- 在MaterialApp中配