[Flutter] ListTile

Bumhyeon Baek·2023년 5월 9일
0

Flutter

목록 보기
5/14

ListTile

일부 텍스트와 선행 또는 후행 아이콘을 포함하는 단일 고정 높이 행(row)

텍스트는 3줄까지 가능하고, 체크박스나 더보기 같은 아이콘을 넣을 수 있다. 아이콘들은 leading (왼쪽 끝), trailing (오른쪽 끝) 프로퍼티에 설정한다.
Title, subTitle 프로퍼티가 있고, 3줄가지 텍스트를 쓰려면 isThreeLine을 true로 해야 한다. 주로 Column, Drawer, Card와 함께 쓰인다.

Card(
  child: ListTile(
    leading: FlutterLogo(),
    title: Text('One-line with both widgets'),
    trailing: Icon(Icons.more_vert),
  ),
),
Card(
  child: ListTile(
    title: Text('One-line dense ListTile'),
    dense: true,
  ),
),
Card(
  child: ListTile(
    leading: FlutterLogo(size: 56.0),
    title: Text('Two-line ListTile'),
    subtitle: Text('Here is a second line'),
    trailing: Icon(Icons.more_vert),
  ),
),
profile
Cool Leader

0개의 댓글