Skip to content

Checkbox

A customizable checkbox widget with optional label and description text. It supports various states including checked, unchecked, indeterminate, error, and read-only states.

The CheckTile widget provides a flexible way to handle boolean input from users. It can be used standalone or with labels and descriptions for better user experience.

  • States: Active, Inactive, Indeterminate, Disabled, Error
  • Content: Supports labels and descriptions
  • Customizable: Supports custom styling, colors, and sizing

Checkbox in checked state.


Checkbox in unchecked state.


Checkbox in indeterminate state, typically used for parent checkboxes when some but not all children are selected.


Checkbox that cannot be interacted with.


Checkbox with error styling.


Checkbox with a label and optional description text.


A practical example showing parent-child checkbox relationships with indeterminate state.


PropertyTypeDescription
valuebool?Required. Current state of the checkbox (true, false, or null for indeterminate).
onChangedvoid Function(bool?)?Callback when checkbox state changes. If null, checkbox is disabled.
labelString?Text label displayed next to the checkbox. Makes the label clickable.
labelStyleTextStyle?Text style for the label. Default: AppFonts.regular14.
descriptionString?Additional description text displayed below the label.
descriptionStyleTextStyle?Text style for the description. Default: AppFonts.regular12.
spacingdoubleSpacing between checkbox and label/description column. Default: 12.
sizedoubleSize of the checkbox in logical pixels. Default: 15.
scaledoubleScale factor for the checkbox. Default: 1.
indeterminateboolWhether checkbox is in indeterminate state. Default: false.
isErrorboolWhether checkbox is in error state with error styling. Default: false.
readOnlyboolWhether checkbox is read-only and cannot be interacted with. Default: false.
activeColorColor?Color when checkbox is checked or indeterminate. Uses theme colors if not provided.
borderColorColor?Color of the checkbox border. Uses theme colors if not provided.
borderRadiusBorderRadiusGeometryBorder radius of the checkbox. Default: BorderRadius.all(Radius.circular(4)).