Scaffold Class
足場となるウィジェット。 基本的な部品が配置できる。
AppBar Class
iOSでいう UINavigationBar
Image class
種類が3つ存在。
- Dart
- Image
- Widget
今回使ったのは 3
Constructor が複数ある。
Widget 内にカーソルがある状態で alt
+ Enter
画像を Assets として登録
- プロジェクトフォルダ直下にディレクトリ作成、イメージをそこに配置
- pubspec.yaml の To add assets to … 部で assets パスを記載
# To add assets to your application, add an assets section, like this: assets: - images/
※ ファイル個別記載に加え、フォルダ指定もできる
Container Widget (one of the Single-child layout widgets)
- 子が無い場合は最大まで広がる
- 子がある場合は、最小サイズに縮む
marginの指定方法
margin: EdgeInsets.all(20),
margin: EdgeInsets.symmetric(vertical: 50, horizontal: 10),
margin: EdgeInsets.only(left: 30),
// LTRB: Left, Top, Right, Bottom margin: EdgeInsets.fromLTRB(30, 10, 10, 10),
Column Widget (one of the Multi-child layout widgets)
縦方向に要素を並べる。 <==> Row Widget (横方向に要素を並べる)
mainAxisAlignment
メイン軸の揃え指定。
crossAxisAlignment
メイン軸に対する垂直方向揃え指定。
CrossAxisAlignment.stretch
子要素を自身の垂直方向幅いっぱいまで広げる。
verticalDirection
縦方向の並び順指定。
SizedBox Widget
所謂スペーサー。