RawFloatingCursorPoint constructor Null safety

RawFloatingCursorPoint(
  1. {Offset? offset,
  2. required FloatingCursorDragState state}
)

Creates information for setting the position and state of a floating cursor.

state must not be null and offset must not be null if the state is FloatingCursorDragState.Update.

Implementation

RawFloatingCursorPoint({
  this.offset,
  required this.state,
}) : assert(state != null),
     assert(state != FloatingCursorDragState.Update || offset != null);