InkResponse constructor Null safety

const InkResponse(
  1. {Key? key,
  2. Widget? child,
  3. GestureTapCallback? onTap,
  4. GestureTapDownCallback? onTapDown,
  5. GestureTapUpCallback? onTapUp,
  6. GestureTapCallback? onTapCancel,
  7. GestureTapCallback? onDoubleTap,
  8. GestureLongPressCallback? onLongPress,
  9. ValueChanged<bool>? onHighlightChanged,
  10. ValueChanged<bool>? onHover,
  11. MouseCursor? mouseCursor,
  12. bool containedInkWell = false,
  13. BoxShape highlightShape = BoxShape.circle,
  14. double? radius,
  15. BorderRadius? borderRadius,
  16. ShapeBorder? customBorder,
  17. Color? focusColor,
  18. Color? hoverColor,
  19. Color? highlightColor,
  20. MaterialStateProperty<Color?>? overlayColor,
  21. Color? splashColor,
  22. InteractiveInkFeatureFactory? splashFactory,
  23. bool enableFeedback = true,
  24. bool excludeFromSemantics = false,
  25. FocusNode? focusNode,
  26. bool canRequestFocus = true,
  27. ValueChanged<bool>? onFocusChange,
  28. bool autofocus = false,
  29. MaterialStatesController? statesController}
)

Creates an area of a Material that responds to touch.

Must have an ancestor Material widget in which to cause ink reactions.

The containedInkWell, highlightShape, enableFeedback, and excludeFromSemantics arguments must not be null.

Implementation

const InkResponse({
  super.key,
  this.child,
  this.onTap,
  this.onTapDown,
  this.onTapUp,
  this.onTapCancel,
  this.onDoubleTap,
  this.onLongPress,
  this.onHighlightChanged,
  this.onHover,
  this.mouseCursor,
  this.containedInkWell = false,
  this.highlightShape = BoxShape.circle,
  this.radius,
  this.borderRadius,
  this.customBorder,
  this.focusColor,
  this.hoverColor,
  this.highlightColor,
  this.overlayColor,
  this.splashColor,
  this.splashFactory,
  this.enableFeedback = true,
  this.excludeFromSemantics = false,
  this.focusNode,
  this.canRequestFocus = true,
  this.onFocusChange,
  this.autofocus = false,
  this.statesController,
}) : assert(containedInkWell != null),
     assert(highlightShape != null),
     assert(enableFeedback != null),
     assert(excludeFromSemantics != null),
     assert(autofocus != null),
     assert(canRequestFocus != null);