flushCompleters static method Null safety

void flushCompleters(
  1. {SBError? error}
)

Implementation

static void flushCompleters({SBError? error}) {
  while (_queue.isNotEmpty) {
    final completer = _queue.removeAt(0);
    if (error != null) {
      completer.completeError(error);
    } else {
      completer.complete();
    }
  }
}