core library
Shotik core: configuration, identity storage, transport (dart:io HttpClient and WebSocket), backoff and the app root widget. Support and Analytics build on it; import only the libraries your app uses.
Classes
Functions
-
flushInterval(
int flushMs, int backoff) → Duration - Analytics flush interval: flushMs × 2^backoff, backoff capped at 5.
-
localId(
String prefix) → String - prefix + time in base 36 + 8 random characters, like the reference's localId().
-
reconnectDelay(
int n, [Random? random]) → Duration - Reconnect delay: min(30 s, 500 ms × 2^n) × uniform(0.8, 1.2), n = consecutive failures.
-
retryDelay(
int attempts) → Duration - Send retry delay: min(30 s, 500 ms × 2^attempts).