SwitchModel constructor

SwitchModel(
  1. WidgetModel parent,
  2. String? id, {
  3. String? type,
  4. dynamic visible,
  5. dynamic mandatory,
  6. dynamic editable,
  7. dynamic enabled,
  8. dynamic value,
  9. dynamic defaultValue,
  10. dynamic width,
  11. dynamic label,
  12. dynamic color,
  13. dynamic onchange,
  14. dynamic post,
})

Implementation

SwitchModel(
  WidgetModel super.parent,
  super.id, {
  String? type,
  dynamic visible,
  dynamic mandatory,
  dynamic editable,
  dynamic enabled,
  dynamic value,
  dynamic defaultValue,
  dynamic width,
  dynamic label,
  dynamic color,
  dynamic onchange,
  dynamic post,
}) {
  if (mandatory != null) this.mandatory = mandatory;
  if (editable != null) this.editable = editable;
  if (enabled != null) this.enabled = enabled;
  if (value != null) this.value = value;
  if (defaultValue != null) this.defaultValue = defaultValue;
  if (width != null) this.width = width;
  if (label != null) this.label = label;
  if (color != null) this.color = color;
  if (onchange != null) this.onchange = onchange;
  if (post != null) this.post = post;

  alarming = false;
  dirty = false;
}