「Flutter/font」の版間の差分
提供: 初心者エンジニアの簡易メモ
(ページの作成:「==日本語フォント対応== Textの第2引数 Text('編集') ↓ Text('編集', style: TextStyle(locale: Locale("ja", "JP")) <pre> children: <Widget>[ Cupertin...」) |
|||
| 行9: | 行9: | ||
CupertinoButton.filled( | CupertinoButton.filled( | ||
child: const Text('タグ名編集', style: TextStyle(locale: Locale("ja", "JP")) | child: const Text('タグ名編集', style: TextStyle(locale: Locale("ja", "JP")) | ||
| + | </pre> | ||
| + | |||
| + | ===全体対応=== | ||
| + | locale: Locale("ja", "JP"),を追加 | ||
| + | |||
| + | app.dart | ||
| + | <pre> | ||
| + | Widget build(BuildContext context) { | ||
| + | return MaterialApp( | ||
| + | locale: Locale("ja", "JP"), | ||
</pre> | </pre> | ||
2019年10月24日 (木) 01:11時点における版
日本語フォント対応
Textの第2引数
Text('編集')
↓
Text('編集', style: TextStyle(locale: Locale("ja", "JP"))
children: <Widget>[
CupertinoButton.filled(
child: const Text('タグ名編集', style: TextStyle(locale: Locale("ja", "JP"))
全体対応
locale: Locale("ja", "JP"),を追加
app.dart
Widget build(BuildContext context) {
return MaterialApp(
locale: Locale("ja", "JP"),
