Switch constructor Null safety

const Switch(
  1. {Key? key,
  2. required bool value,
  3. FormBoolField? field,
  4. Color? activeColor,
  5. Color? activeTrackColor,
  6. Color? inactiveThumbColor,
  7. Color? inactiveTrackColor,
  8. ImageProvider? activeThumbImage,
  9. ImageProvider? inactiveThumbImage,
  10. MaterialStateProperty? thumbColor,
  11. MaterialStateProperty? trackColor,
  12. MaterialTapTargetSize? materialTapTargetSize,
  13. DragStartBehavior dragStartBehavior,
  14. MouseCursor? mouseCursor,
  15. Color? focusColor,
  16. Color? hoverColor,
  17. MaterialStateProperty? overlayColor,
  18. double? splashRadius,
  19. BoolSelectionCallback? onFocusChange,
  20. bool autofocus}
)

Implementation

const factory Switch(
    {final Key? key,
    required final bool value,
    final FormBoolField? field,
    final Color? activeColor,
    final Color? activeTrackColor,
    final Color? inactiveThumbColor,
    final Color? inactiveTrackColor,
    final ImageProvider? activeThumbImage,
    final ImageProvider? inactiveThumbImage,
    final MaterialStateProperty? thumbColor,
    final MaterialStateProperty? trackColor,
    final MaterialTapTargetSize? materialTapTargetSize,
    final DragStartBehavior dragStartBehavior,
    final MouseCursor? mouseCursor,
    final Color? focusColor,
    final Color? hoverColor,
    final MaterialStateProperty? overlayColor,
    final double? splashRadius,
    final BoolSelectionCallback? onFocusChange,
    final bool autofocus}) = _$Switch;