Offline queue: retry kirim setelah refresh/poll sukses + verifikasi server reachable + log gagal sinkron + izin INTERNET/ACCESS_NETWORK_STATE Android

This commit is contained in:
Onie
2026-10-18 17:39:38 +07:00
parent 8a6541e55f
commit 67b4d934a4
3 changed files with 26 additions and 0 deletions

View File

@@ -224,6 +224,8 @@ class AppState extends ChangeNotifier {
await _loadProducts();
await _loadSales();
dataReady = true;
// Server terbukti reachable → coba kirim antrean transaksi offline.
await _offlineQueue.retryNow();
} catch (e) {
productsError ??= e.toString();
if (retries > 0) {