cancel method

Future<void> cancel ()

End the gesture by canceling the pointer (as would happen if the system showed a modal dialog on top of the Flutter application, for instance).

The object is no longer usable after this method has been called.

Implementation

Future<void> cancel() {
  return TestAsyncUtils.guard<void>(() async {
    assert(_pointer._isDown);
    await _dispatcher(_pointer.cancel(), _result);
    assert(!_pointer._isDown);
  });
}