support_ui library

The Shotik Support widget: launcher, bottom sheet, conversation list and thread, built from plain Flutter widgets.

Functions

attachmentsOf(Message m) → List<Map<String, Object?>>
A message's attachments: server ones carry path (signed, relative to serverUrl); optimistic ones carry bytes (Uint8List) or file (a local path).
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().
receiptOf(Message m, List<Message> list, Conversation? conv, {bool offline = false}) → Receipt?
Receipt for one of your messages (PROTOCOL.md 3.5): failed, queued (waiting, or offline) or sending, then seen when it is not among the conversation's last founderUnread user messages, delivered when deliveredAt is set, else sent.
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).

Exceptions / Errors

HttpError