ZetaListItem.toggle constructor
Creates a ZetaListItem with a ZetaSwitch in the trailing widget space.
Implementation
ZetaListItem.toggle({
super.key,
super.rounded,
required this.primaryText,
this.secondaryText,
this.showDivider,
this.leading,
bool value = false,
ValueChanged<bool?>? onChanged,
}) : trailing = ZetaSwitch(
value: value,
onChanged: onChanged,
variant: ZetaSwitchType.android,
),
onTap = (() => onChanged?.call(!value));