runFutureQueue<T> method
Sets the key for error logs, runs the future in queue which means next future will not run unless the previous gets completed.
key: by default typeName
, if null, status will be update in default key
Implementation
Future<T?> runFutureQueue<T>(
Callback<Future<T?>> callback, {
Object? key,
bool throwException = false,
}) =>
(_futureQueue.pop() ?? Future.value())
.whenComplete(() => runErrorFuture<T>(
_futureQueue.push(callback()),
key: key,
throwException: throwException,
));