ZetaListItem.checkbox constructor

ZetaListItem.checkbox({
  1. Key? key,
  2. bool? rounded,
  3. required String primaryText,
  4. String? secondaryText,
  5. Widget? leading,
  6. bool? showDivider,
  7. bool value = false,
  8. ValueChanged<bool>? onChanged,
  9. bool useIndeterminate = false,
})

Creates a ZetaListItem with a ZetaCheckbox in the trailing widget space.

Implementation

ZetaListItem.checkbox({
  super.key,
  super.rounded,
  required this.primaryText,
  this.secondaryText,
  this.leading,
  this.showDivider,
  bool value = false,
  ValueChanged<bool>? onChanged,
  bool useIndeterminate = false,
})  : trailing = ZetaCheckbox(
        value: value,
        onChanged: onChanged,
        useIndeterminate: useIndeterminate,
        rounded: rounded,
      ),
      onTap = (() => onChanged?.call(!value));