Skip to content

Checkboxs

Checkboxes allow users to select one or more items from a set. Checkboxes can turn an option on or off.

Checkbox Default

Checkbox Default

Checkbox(
    value: false,
    onChanged: (bool? value) {},
)

Checkbox List Tile

Checkbox Button list tile

CheckboxListTile(
  onChanged:(bool? value) { },
  value: true,
  title: const Text('Checkbox Title'),
),

Customization

To change the whole Checkboxs Theme, please open the core/themes/app_theme.dart. Here's how to change the Widget Radio Chackboxs theme:

checkboxTheme: CheckboxThemeData(
    fillColor: MaterialStateProperty.resolveWith<Color>((Set<MaterialState> states) {
    if (states.contains(MaterialState.selected)) {
        return AppColors.secondary;
    } else if (states.contains(MaterialState.hovered)) {
        return AppColors.splash;
    }
    return AppColors.fillPrimary;
    }),
),
Authors: Nanang Prasetya