moveTo method Null safety

Future<void> moveTo(
  1. Offset location,
  2. {Duration timeStamp =}

Send a move event moving the pointer to the given location.

If the pointer is down, then a move event is dispatched. If the pointer is up, then a hover event is dispatched.


Future<void> moveTo(Offset location, { Duration timeStamp = }) {
  return TestAsyncUtils.guard<void>(() {
    if (_pointer._isDown) {
      return _dispatcher(_pointer.move(location, timeStamp: timeStamp));
    } else {
      return _dispatcher(_pointer.hover(location, timeStamp: timeStamp));