IconButton을 사용하면 위와 같이 아이콘 외에 주변에 패딩이 들어가 있습니다.
48px의 사이즈로 둘러싸져 있는데, 이 부분을 제거하고 싶을 때가 있습니다.
조금 검색해보면 아래와 같이 padding: EdgeInsets.zero을 추가하면 된다고 하는데 되지 않는다....
IconButton(onPressed: (){},
icon: Icon(Icons.close, size: 12, ),
padding: EdgeInsets.zero,
),
padding: EdgeInsets.zero , constraints: BoxConstraints() 추가하면 된다.
IconButton(onPressed: (){},
icon: Icon(Icons.close, size: 12, ),
padding: EdgeInsets.zero,
constraints: BoxConstraints(),
),
'Flutter(플러터) > UI' 카테고리의 다른 글
Flutter 드래그 ( draggable ) FAB ( Floating action button ) (0) | 2022.01.12 |
---|---|
다양한 사이즈 Grid Layout - flutter_staggered_grid_view (0) | 2022.01.12 |
Flutter MainAxisSize min ? max ? (0) | 2022.01.06 |
Flutter Deep ( Dynamic ) Link ( 딥 링크, 다이나믹 링크 ) (0) | 2022.01.06 |
Flutter onResume() , onPause() 있다? (0) | 2022.01.06 |
댓글