JsonSwitch constructor

JsonSwitch({
  1. Map<String, dynamic> args = const {},
  2. JsonWidgetRegistry? registry,
  3. Color? activeColor,
  4. ImageProvider<Object>? activeThumbImage,
  5. Color? activeTrackColor,
  6. bool autofocus = false,
  7. AutovalidateMode? autovalidateMode,
  8. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  9. bool enabled = true,
  10. Color? focusColor,
  11. FocusNode? focusNode,
  12. Color? hoverColor,
  13. Color? inactiveThumbColor,
  14. ImageProvider<Object>? inactiveThumbImage,
  15. Color? inactiveTrackColor,
  16. String? label,
  17. MaterialTapTargetSize? materialTapTargetSize,
  18. MouseCursor? mouseCursor,
  19. void onActiveThumbImageError(
    1. Object,
    2. StackTrace?
    )?,
  20. void onChanged(
    1. bool
    )?,
  21. void onInactiveThumbImageError(
    1. Object,
    2. StackTrace?
    )?,
  22. void onSaved(
    1. bool?
    )?,
  23. WidgetStateProperty<Color?>? overlayColor,
  24. double? splashRadius,
  25. WidgetStateProperty<Color?>? thumbColor,
  26. WidgetStateProperty<Icon?>? thumbIcon,
  27. WidgetStateProperty<Color?>? trackColor,
  28. Validator? validator,
  29. bool value = false,
  30. VisualDensity? visualDensity,
})

Implementation

JsonSwitch({
  Map<String, dynamic> args = const {},
  JsonWidgetRegistry? registry,
  this.activeColor,
  this.activeThumbImage,
  this.activeTrackColor,
  this.autofocus = false,
  this.autovalidateMode,
  this.dragStartBehavior = DragStartBehavior.start,
  this.enabled = true,
  this.focusColor,
  this.focusNode,
  this.hoverColor,
  this.inactiveThumbColor,
  this.inactiveThumbImage,
  this.inactiveTrackColor,
  this.label,
  this.materialTapTargetSize,
  this.mouseCursor,
  this.onActiveThumbImageError,
  this.onChanged,
  this.onInactiveThumbImageError,
  this.onSaved,
  this.overlayColor,
  this.splashRadius,
  this.thumbColor,
  this.thumbIcon,
  this.trackColor,
  this.validator,
  this.value = false,
  this.visualDensity,
}) : super(
        jsonWidgetArgs: JsonSwitchBuilderModel.fromDynamic(
          {
            'activeColor': activeColor,
            'activeThumbImage': activeThumbImage,
            'activeTrackColor': activeTrackColor,
            'autofocus': autofocus,
            'autovalidateMode': autovalidateMode,
            'dragStartBehavior': dragStartBehavior,
            'enabled': enabled,
            'focusColor': focusColor,
            'focusNode': focusNode,
            'hoverColor': hoverColor,
            'inactiveThumbColor': inactiveThumbColor,
            'inactiveThumbImage': inactiveThumbImage,
            'inactiveTrackColor': inactiveTrackColor,
            'label': label,
            'materialTapTargetSize': materialTapTargetSize,
            'mouseCursor': mouseCursor,
            'onActiveThumbImageError': onActiveThumbImageError,
            'onChanged': onChanged,
            'onInactiveThumbImageError': onInactiveThumbImageError,
            'onSaved': onSaved,
            'overlayColor': overlayColor,
            'splashRadius': splashRadius,
            'thumbColor': thumbColor,
            'thumbIcon': thumbIcon,
            'trackColor': trackColor,
            'validator': validator,
            'value': value,
            'visualDensity': visualDensity,
            ...args,
          },
          args: args,
          registry: registry,
        ),
        jsonWidgetBuilder: () => JsonSwitchBuilder(
          args: JsonSwitchBuilderModel.fromDynamic(
            {
              'activeColor': activeColor,
              'activeThumbImage': activeThumbImage,
              'activeTrackColor': activeTrackColor,
              'autofocus': autofocus,
              'autovalidateMode': autovalidateMode,
              'dragStartBehavior': dragStartBehavior,
              'enabled': enabled,
              'focusColor': focusColor,
              'focusNode': focusNode,
              'hoverColor': hoverColor,
              'inactiveThumbColor': inactiveThumbColor,
              'inactiveThumbImage': inactiveThumbImage,
              'inactiveTrackColor': inactiveTrackColor,
              'label': label,
              'materialTapTargetSize': materialTapTargetSize,
              'mouseCursor': mouseCursor,
              'onActiveThumbImageError': onActiveThumbImageError,
              'onChanged': onChanged,
              'onInactiveThumbImageError': onInactiveThumbImageError,
              'onSaved': onSaved,
              'overlayColor': overlayColor,
              'splashRadius': splashRadius,
              'thumbColor': thumbColor,
              'thumbIcon': thumbIcon,
              'trackColor': trackColor,
              'validator': validator,
              'value': value,
              'visualDensity': visualDensity,
              ...args,
            },
            args: args,
            registry: registry,
          ),
        ),
        jsonWidgetType: JsonSwitchBuilder.kType,
      );