상중하로 나눠주는 클래스
home: Scaffold(
appBar: AppBar(),
body: Container(),
bottomNavigationBar: BottomAppBar(),
)
결과:
home: Scaffold(
//가로로 정렬할 때 사용 , 세로 Column으로만 바꾸면댐
//가로축 정렬
mainAxisAlignment: MainAxisAlignment.center,
//세로축 정렬
crossAxisAlignment: CrossAxisAlignment.center,
body: Row(
children: [
Icon(Icons.star),
Icon(Icons.star)
],
),
)
//body: Container(
// child: Icon(Icons.star),
// ),
안드로이드 스튜디오에서 자동완성 기능 ctrl + space
----------------------
appbar 같은거에서 높이같은거 설정할때는 child에서는 높이 설정이 되지않아서 Container or SizedBox 로 감싸서 height를 주면 쉽게 가능
'앱 > Flutter(Dart)' 카테고리의 다른 글
[Flutter] floatingActionButton (0) | 2022.04.12 |
---|---|
[Flutter] ListView.builder (0) | 2022.04.12 |
[Flutter] Column 대신 ListView (0) | 2022.04.11 |
[Flutter] Custom widget (0) | 2022.04.10 |
[Flutter] Flexible, Expanded (0) | 2022.04.10 |
댓글