Skip to main content

CheckBox

The Stac CheckBox allows you to build a Flutter CheckBox widget using JSON. To know more about the CheckBox widget in Flutter, refer to the official documentation.

Properties​

PropertyTypeDescription
idString?The identifier for the checkbox.
valuebool?The current value of the checkbox.
tristateboolWhether this checkbox is in a tristate mode. Defaults to false.
onChangedMap<String, dynamic>?The callback that is called when the value changes.
mouseCursorStacMouseCursor?The cursor for a mouse pointer when it enters or is hovering over the checkbox.
activeColorString?The color to use when this checkbox is checked.
fillColorStacMaterialColor?The color to use for the fill of the checkbox.
checkColorString?The color to use for the check icon.
focusColorString?The color to use for the checkbox's focus color.
hoverColorString?The color to use for the checkbox's hover color.
overlayColorStacMaterialColor?The color to use for the checkbox's overlay color.
splashRadiusdouble?The splash radius of the checkbox's tap target.
materialTapTargetSizeMaterialTapTargetSize?Configures the minimum size of the tap target.
autofocusboolWhether this checkbox should focus itself if nothing else is already focused. Defaults to false.
isErrorboolWhether this checkbox is in an error state. Defaults to false.

Example JSON​

{
"type": "checkBox",
"id": "checkbox_1",
"value": true,
"tristate": false,
"mouseCursor": "click",
"activeColor": "#FF0000",
"fillColor": {
"type": "materialColor",
"color": "#00FF00"
},
"checkColor": "#0000FF",
"focusColor": "#FFFF00",
"hoverColor": "#FF00FF",
"splashRadius": 20.0,
"materialTapTargetSize": "padded",
"autofocus": true,
"isError": false
}