queueCall method
Puts rpcCall to calls queue that will be processed when online
Implementation
Future<void> queueCall(OdooRpcCall call, {bool awaited = false}) async {
var calls = await pendingCalls;
await callsLock.protectWrite(() async {
calls.add(call);
await cache.put(pendingCallsKey, calls);
});
if (await netConnectivity.checkNetConn() == netConnState.online) {
if (awaited) {
return await _processCallQueue();
}
unawaited(_processCallQueue());
}
}