Checkboxes

checkbox

Checkboxes are used to let a user select one or more items from a set. Also, Checkboxes can be used to turn an option on or off.

Usage

XelaCheckbox(
    checkboxIcon: Icon(Icons.done, color: Colors.white,),
    label: "Label",
    caption: "caption",
    size: XelaCheckboxSize.LARGE,
    selectedColor: _isDark ? XelaColor.Blue5 : XelaColor.Blue3,
    defaultColor: _isDark ? XelaColor.Gray4 : XelaColor.Gray11,
    valueColor: _isDark ? XelaColor.Red5 : XelaColor.Red3,
    labelColor: _isDark ? XelaColor.Gray11 : XelaColor.Gray2,
    captionColor: _isDark ? XelaColor.Gray6 : XelaColor.Gray8,
    disabled: false
)

Properties

Name Type Default Value Required Description
checkboxIcon Widget? null NO Icon widget
label String? null NO Label string for checkbox
caption String? null NO Caption string for checkbox
value String? null NO Value string for checkbox, right position
onChange Function(bool)? null NO On change checkbox function
selectedColor Color XelaColor.Blue3 NO Color for selected checkbox
defaultColor Color XelaColor.Gray11 NO Color for unselected checkbox
valueColor Color XelaColor.Red3 NO Color for value string
size XelaCheckboxSize XelaCheckboxSize.MEDIUM NO Size for checkbox (LARGE, MEDIUM, SMALL)
disabled bool false NO Disable for checkbox
isChecked bool false NO Checkbox status for checkbox
labelColor Color XelaColor.Gray2 NO Color for label string
captionColor Color XelaColor.Gray8 NO Color for caption string