readyToExecuteWSRequest static method
Implementation
static Future<void> readyToExecuteWSRequest() async {
final state = SendbirdSdk().getConnectionState();
if (state == ConnectionState.open) {
flushCompleters();
return;
}
if (state == ConnectionState.closed) {
throw ConnectionRequiredError();
}
final completer = Completer();
_queue.add(completer);
return completer.future;
}