Checkbox

An input that lets users select one or more options from a limited number of choices. Each selection is independent (with some exceptions).

Component checklist

Flutter

Is new design vision part implemented using new tokens?

Up to date

Resources

 

Examples

Forms/Checkbox


                                                        
                                                        
                                                            OptimusCheckbox(
                                                                  label: Text('Label'),
                                                                  isEnabled: true,
                                                                  size: OptimusCheckboxSize.large,
                                                                  isChecked: _checked,
                                                                  onChanged: _handleChanged,
                                                                )
                                                        
                                                            

OptimusCheckbox Example

API

Name

Description

Type

Default

label

The label of the Checkbox.

Widget

 

isChecked

Whether the Checkbox is selected.

bool?

false

tristate

Whether the Checkbox supports an undecisive state when some of its content is selected and some aren’t.

bool

false

error

The optional error of the Checkbox.

String?

 

isEnabled

Whether the Checkbox is enabled and is interactable.

bool

 

size

The size of the Checkbox.

OptimusCheckboxSize

OptimusCheckboxSize.large

onChanged

The callback when the state of the Checkbox has changed.

VoidCallback?