completeError method
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);
}