「Flutter コードサンプル」の版間の差分
ナビゲーションに移動
検索に移動
2行目: | 2行目: | ||
{{amazon|4798055832}} | {{amazon|4798055832}} | ||
+ | |||
+ | ====テキストのみ配置する==== | ||
+ | import 'package:flutter/material.dart'; | ||
+ | |||
+ | void main() => runApp(MyApp()); | ||
+ | |||
+ | class MyApp extends StatelessWidget { | ||
+ | @override | ||
+ | Widget build(BuildContext context) { | ||
+ | return new MaterialApp( | ||
+ | title: 'Flutter Sample', | ||
+ | home: Text( | ||
+ | 'Hello, Flutter!!', | ||
+ | style: TextStyle(fontSize: 32.0), | ||
+ | ), | ||
+ | ); | ||
+ | } | ||
+ | } | ||
+ | [[File:Flutter_simple.png]] |
2020年3月15日 (日) 06:45時点における版
テキストのみ配置する
import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( title: 'Flutter Sample', home: Text( 'Hello, Flutter!!', style: TextStyle(fontSize: 32.0), ), ); } }
© 2006 矢木浩人