cancel method

Future<void> cancel([
  1. String code = 'm.unknown',
  2. bool quiet = false
])

Implementation

Future<void> cancel([String code = 'm.unknown', bool quiet = false]) async {
  if (!quiet && (deviceId != null || room != null)) {
    await send(EventTypes.KeyVerificationCancel, {
      'reason': code,
      'code': code,
    });
  }
  canceled = true;
  canceledCode = code;
  setState(KeyVerificationState.error);
}