checkbox_formfield

pub package

A few kinds of checkbox that can be used as FormField

Getting Started

This library currently has two Widgets.

  • CheckboxListTileFormField: Use CheckboxListTile in Form
  • CheckboxIconFormField: Use two Icons as if they consist a checkbox and also in Form

Demo

Demo

Usage sample

Please check example/lib in this library.

Specifications

CheckboxListTileFormField

ParameterDescription
keyFormField.key
titleCheckboxListTile.title
contextProvide a default color to errorColor
onSavedFormField.onSaved
validatorFormField.validator
initialValueFormField.initialValue
autovalidateModeFormField.autovalidateMode
enabledWhether the checkbox is enabled
denseCheckboxListTile.dense
errorColorColor of error message
Default: Theme.errorColor (context is given), Colors.red (otherwise)
activeColorCheckboxListTile.activeColor
checkColorCheckboxListTile.checkColor
controlAffinityCheckboxListTile.controlAffinity
secondaryCheckboxListTile.secondary
contentPaddingCheckboxListTile.contentPadding
autofocusCheckboxListTile.autofocus

CheckboxIconFormField

ParameterDescription
keyFormField.key
contextProvide a default color to errorColor
onSavedFormField.onSaved
initialValueFormField.initialValue
autovalidateModeFormField.autovalidateMode
enabledWhether the checkbox is enabled
trueIconIconData if true
Default: Icons.check
falseIconIconData if false
Default: Icons.check_box_outline_blank
trueIconColorColor if true
Default: Theme.colorScheme.secondary (if context is given), Theme.iconTheme.color (otherwise)
falseIconColorColor if false
Default: Theme.iconTheme.color
disabledColorColor if disabled
Default: Theme.disabledColor
paddingpadding
Default: 24.0
iconSizeIcon.size

Libraries

checkbox_formfield
checkbox_icon_formfield
checkbox_list_tile_formfield