MaterialSwitchData constructor Null safety

MaterialSwitchData(
  1. {Key? widgetKey,
  2. bool? value,
  3. void onChanged(
    1. bool
    )?,
  4. Color? activeColor,
  5. DragStartBehavior? dragStartBehavior,
  6. Color? activeTrackColor,
  7. Color? inactiveThumbColor,
  8. Color? inactiveTrackColor,
  9. ImageProvider<Object>? activeThumbImage,
  10. ImageProvider<Object>? inactiveThumbImage,
  11. MaterialTapTargetSize? materialTapTargetSize,
  12. Color? focusColor,
  13. Color? hoverColor,
  14. FocusNode? focusNode,
  15. bool? autofocus,
  16. ImageErrorListener? onActiveThumbImageError,
  17. ImageErrorListener? onInactiveThumbImageError,
  18. MouseCursor? mouseCursor,
  19. MaterialStateProperty<Color?>? overlayColor,
  20. double? splashRadius,
  21. MaterialStateProperty<Color?>? thumbColor,
  22. MaterialStateProperty<Color?>? trackColor}
)

Implementation

MaterialSwitchData({
  Key? widgetKey,
  bool? value,
  void Function(bool)? onChanged,
  Color? activeColor,
  DragStartBehavior? dragStartBehavior,
  this.activeTrackColor,
  this.inactiveThumbColor,
  this.inactiveTrackColor,
  this.activeThumbImage,
  this.inactiveThumbImage,
  this.materialTapTargetSize,
  this.focusColor,
  this.hoverColor,
  this.focusNode,
  this.autofocus,
  this.onActiveThumbImageError,
  this.onInactiveThumbImageError,
  this.mouseCursor,
  this.overlayColor,
  this.splashRadius,
  this.thumbColor,
  this.trackColor,
}) : super(
        widgetKey: widgetKey,
        value: value,
        onChanged: onChanged,
        activeColor: activeColor,
        dragStartBehavior: dragStartBehavior,
      );