koma_flutter library
Koma Analytics SDK for Flutter.
Public surface (everything else under src/ is internal and may change):
- Koma — the singleton client. Call Koma.init once, then use
Koma.instance to
track,identify, andsetUserProperty. - KomaConfig — initialization options.
- ConnectionError — passed to KomaConfig.onConnectionError.
- KomaNavigatorObserver / KomaScreenEvent — opt-in screen-tracking helper. Inert unless you supply a mapper; it never invents event names.
The SDK emits only events your app explicitly tracks — there is no
automatic screen or lifecycle tracking. See doc/CROSS-PLATFORM-SPEC.md.
Classes
- ConnectionError
- Raised (via KomaConfig.onConnectionError) when the socket fails to connect. message is the server's human-readable reason; code mirrors the API's structured rejection code when present.
- Koma
- The Koma Analytics client.
- KomaConfig
- Immutable initialization options for Koma.init.
- Opt-in NavigatorObserver that turns navigation into tracked events.
- KomaScreenEvent
- An app-declared screen event: an eventName your tracking plan already defines, plus optional properties. Returned by a KomaRouteMapper.
Enums
- ConnectionErrorCode
-
Machine-readable classification of a socket connect failure. Mirrors the
API's socket-auth rejection codes (
socket-auth.adapter.ts).
Typedefs
- KomaRouteMapper = KomaScreenEvent? Function(Route route)
-
Maps a route to the screen event that should fire for it, or
nullto fire nothing. The SDK never invents a name — you provide it.