본문 바로가기

Flutter

Flutter Checkbox padding 없애기

 

 

Checkbox class - material library - Dart API

A Material Design checkbox. The checkbox itself does not maintain any state. Instead, when the state of the checkbox changes, the widget calls the onChanged callback. Most widgets that use a checkbox will listen for the onChanged callback and rebuild the c

api.flutter.dev

 

 

Flutter Checkbox에는 padding 옵션이 없어서 padding 을 없앨 수 없다

  SizedBox(
    height: 24.0,
    width: 24.0,
    child: Checkbox(),
 )

 

해당 코드와 같이 SizedBox로 감싸주자