JsonCupertinoSwitch constructor

JsonCupertinoSwitch({
  1. Map<String, dynamic> args = const {},
  2. JsonWidgetRegistry? registry,
  3. Color? activeColor,
  4. AutovalidateMode? autovalidateMode,
  5. DragStartBehavior? dragStartBehavior,
  6. bool enabled = true,
  7. String? label,
  8. void onChanged(
    1. bool
    )?,
  9. void onSaved(
    1. bool?
    )?,
  10. String? restorationId,
  11. Color? thumbColor,
  12. Color? trackColor,
  13. required dynamic validators,
  14. bool value = false,
  15. VisualDensity? visualDensity,
})

Implementation

JsonCupertinoSwitch({
  Map<String, dynamic> args = const {},
  JsonWidgetRegistry? registry,
  this.activeColor,
  this.autovalidateMode,
  this.dragStartBehavior,
  this.enabled = true,
  this.label,
  this.onChanged,
  this.onSaved,
  this.restorationId,
  this.thumbColor,
  this.trackColor,
  required this.validators,
  this.value = false,
  this.visualDensity,
}) : super(
        jsonWidgetArgs: JsonCupertinoSwitchBuilderModel.fromDynamic(
          {
            'activeColor': activeColor,
            'autovalidateMode': autovalidateMode,
            'dragStartBehavior': dragStartBehavior,
            'enabled': enabled,
            'label': label,
            'onChanged': onChanged,
            'onSaved': onSaved,
            'restorationId': restorationId,
            'thumbColor': thumbColor,
            'trackColor': trackColor,
            'validators': validators,
            'value': value,
            'visualDensity': visualDensity,
            ...args,
          },
          args: args,
          registry: registry,
        ),
        jsonWidgetBuilder: () => JsonCupertinoSwitchBuilder(
          args: JsonCupertinoSwitchBuilderModel.fromDynamic(
            {
              'activeColor': activeColor,
              'autovalidateMode': autovalidateMode,
              'dragStartBehavior': dragStartBehavior,
              'enabled': enabled,
              'label': label,
              'onChanged': onChanged,
              'onSaved': onSaved,
              'restorationId': restorationId,
              'thumbColor': thumbColor,
              'trackColor': trackColor,
              'validators': validators,
              'value': value,
              'visualDensity': visualDensity,
              ...args,
            },
            args: args,
            registry: registry,
          ),
        ),
        jsonWidgetType: JsonCupertinoSwitchBuilder.kType,
      );