郑松岚*_*郑松岚 1 flutter flutter-dependencies flutter-layout
我试过这个,但它似乎不起作用:
new MaterialApp(
title: 'Mian',
localizationsDelegates: [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
supportedLocales: [
const Locale('zh','HK')
],
Run Code Online (Sandbox Code Playgroud)
我想将粘贴更改为 ???Select All 为 ????
flutter_localizations到pubspec.yamldependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
Run Code Online (Sandbox Code Playgroud)
flutter_localizations到main.dartimport 'package:flutter_localizations/flutter_localizations.dart';
Run Code Online (Sandbox Code Playgroud)
supportedLocalesclass App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter',
home: new HomePage(title: ''),
localizationsDelegates: [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
DefaultCupertinoLocalizations.delegate
],
supportedLocales: [
const Locale('zh','CH'),
],
);
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1144 次 |
| 最近记录: |