shotik library
Everything: core, Support, the Support widget and Analytics.
Classes
- Analytics
- Attachment
- Batch
- Conversation
- DeviceContext
- FileStorage
- HttpTransport
- LocalAttachment
- A picked image or screenshot before upload. Give bytes; the queue keeps them in a file until delivered.
- MemoryStorage
- Message
- RenderShotikMask
- Shotik
- ShotikAnalytics
- ShotikColors
- Color overrides for one scheme; null keeps the default.
- ShotikConfig
- ShotikCopy
- ShotikDevice
- ShotikMask
- Hides what's inside from tap labels and wireframes (one grey block). EditableText is always masked.
- ShotikNative
- ShotikResponse
- ShotikRoot
- ShotikRootState
- ShotikScreen
-
Names the screen it is on:
ShotikScreen(name: 'Paywall', child: ...). Wins over the route name. - ShotikSocket
- ShotikStorage
- ShotikSupport
- ShotikSupportTheme
- ShotikSupportWidget
- ShotikTransport
- SupportClient
- SupportState
- TapTarget
- UserInfo
- WireEvent
- Wireframe
Enums
Constants
- batchSize → const int
-
eventTypes
→ const List<
String> - Event types. Codes are the list position, so append only.
- kOffIsolateEvents → const int
- Batches with more events than this are packed and encoded on a background isolate (see test/perf_test.dart).
- maxQueue → const int
- wireVersion → const int
Functions
-
attachmentsOf(
Message m) → List< Map< String, Object?> > -
A message's attachments: server ones carry
path(signed, relative to serverUrl); optimistic ones carrybytes(Uint8List) orfile(a local path). -
describeTarget(
Element root, RenderBox box, Offset global) → TapTarget - The element under a point, from the render tree (hit test) and the element tree along the hit path.
-
encodeBatch(
Batch b) → String - The request body for a batch. Top-level so it can run on a background isolate via compute().
-
encodeJson(
Object? value) → String -
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().
-
pack(
Batch b) → Map< String, Object?> -
{ v, a, u, f?, c?, t0, d, e } with e =
dt, type, seq, session, screen, name, props | 0. -
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).
-
unpack(
Map< String, Object?> p) → Batch -
wireframe(
Element from, RenderBox root, {int cap = 400}) → List< WireNode> -
The screen under
fromas wireframe nodes inroot's coordinates (logical points), at mostcapnodes. Walks the element tree to read each render object's geometry and kind (RenderParagraph t, RenderImage i, RenderEditable n, ShotikMask m, tap handlers b, viewports s) and, for plain boxes, the fill from the widget (ColoredBox, DecoratedBox, Material). Offstage, transparent, tiny and off-screen boxes are skipped.