「Flutter/UI/Text」の版間の差分
提供: 初心者エンジニアの簡易メモ
(ページの作成:「 ==body内に複数行textを表示== body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[...」) |
|||
| 行21: | 行21: | ||
), | ), | ||
), | ), | ||
| + | |||
| + | ==色追加== | ||
| + | <pre> | ||
| + | Text( | ||
| + | '警告!', | ||
| + | style: TextStyle( | ||
| + | color: Colors.red, | ||
| + | ), | ||
| + | ) | ||
| + | </pre> | ||
2019年11月18日 (月) 03:59時点における版
body内に複数行textを表示
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'hello',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.display1,
),
RaisedButton(
child: Text('Back to MyPage 1'),
onPressed: () {
Navigator.pop(context);
},
),
],
),
),
色追加
Text(
'警告!',
style: TextStyle(
color: Colors.red,
),
)
