ZetaListItem.checkbox constructor
Creates a ZetaListItem with a ZetaCheckbox in the trailing widget space.
Implementation
ZetaListItem.checkbox({
super.key,
super.rounded,
this.title,
this.primaryText,
this.secondaryText,
this.primaryTextStyle,
this.secondaryTextStyle,
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)),
assert(
(title != null && primaryText == null && secondaryText == null) ||
(title == null && (primaryText != null || secondaryText != null)),
'Provide one of either title or primaryText/secondaryText',
);