AndroidMotionEvent constructor Null safety

AndroidMotionEvent(
  1. {required int downTime,
  2. required int eventTime,
  3. required int action,
  4. required int pointerCount,
  5. required List<AndroidPointerProperties> pointerProperties,
  6. required List<AndroidPointerCoords> pointerCoords,
  7. required int metaState,
  8. required int buttonState,
  9. required double xPrecision,
  10. required double yPrecision,
  11. required int deviceId,
  12. required int edgeFlags,
  13. required int source,
  14. required int flags,
  15. required int motionEventId}
)

Creates an AndroidMotionEvent.

All parameters must not be null.

Implementation

AndroidMotionEvent({
  required this.downTime,
  required this.eventTime,
  required this.action,
  required this.pointerCount,
  required this.pointerProperties,
  required this.pointerCoords,
  required this.metaState,
  required this.buttonState,
  required this.xPrecision,
  required this.yPrecision,
  required this.deviceId,
  required this.edgeFlags,
  required this.source,
  required this.flags,
  required this.motionEventId,
}) : assert(downTime != null),
     assert(eventTime != null),
     assert(action != null),
     assert(pointerCount != null),
     assert(pointerProperties != null),
     assert(pointerCoords != null),
     assert(metaState != null),
     assert(buttonState != null),
     assert(xPrecision != null),
     assert(yPrecision != null),
     assert(deviceId != null),
     assert(edgeFlags != null),
     assert(source != null),
     assert(flags != null),
     assert(pointerProperties.length == pointerCount),
     assert(pointerCoords.length == pointerCount);