completeError method

void completeError(
  1. Object error, [
  2. StackTrace? stackTrace
])

Open the gate with an asynchronous failure.

Implementation

void completeError(Object error, [StackTrace? stackTrace]) {
  if (_completer.isCompleted) {
    throw const TestGateAlreadyCompletedException();
  }
  _completer.completeError(error, stackTrace ?? StackTrace.current);
}