hover method Null safety

PointerHoverEvent hover(
  1. Offset newLocation,
  2. {Duration timeStamp = Duration.zero}

Create a PointerHoverEvent to the given location.

By default, the time stamp on the event is Duration.zero. You can give a specific time stamp by passing the timeStamp argument.

isDown must be false, since hover events can't be sent when the pointer is up.


PointerHoverEvent hover(
  Offset newLocation, {
  Duration timeStamp = Duration.zero,
}) {
      'Hover events can only be generated when the pointer is up. To '
      'simulate movement when the pointer is down, use move() instead.');
  final Offset delta = location != null ? newLocation - location! : Offset.zero;
  _location = newLocation;
  return PointerHoverEvent(
    timeStamp: timeStamp,
    kind: kind,
    device: _device,
    pointer: pointer,
    position: newLocation,
    delta: delta,