ArcaneToggleSwitch constructor

const ArcaneToggleSwitch({
  1. String? id,
  2. required bool value,
  3. void onChanged(
    1. bool
    )?,
  4. void onToggle(
    1. bool
    )?,
  5. bool disabled = false,
  6. ComponentSize size = ComponentSize.md,
  7. ColorVariant color = ColorVariant.primary,
  8. String? label,
  9. bool labelLeft = false,
  10. String? group,
  11. String? itemValue,
  12. ArcaneStyleData? styles,
  13. ArcaneDecoration? decoration,
  14. Key? key,
})

Implementation

const ArcaneToggleSwitch({
  this.id,
  required this.value,
  void Function(bool)? onChanged,
  void Function(bool)? onToggle,
  this.disabled = false,
  this.size = ComponentSize.md,
  this.color = ColorVariant.primary,
  this.label,
  this.labelLeft = false,
  this.group,
  this.itemValue,
  this.styles,
  this.decoration,
  super.key,
}) : onChanged = onChanged ?? onToggle;