Sankofa class

The main entry point for the Sankofa Analytics SDK.

Use Sankofa.instance to access the singleton client.

Properties

hashCode int
The hash code for this object.
no setterinherited
isInitialized bool
Returns true if the SDK has been initialized.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() Future<void>
Disposes of the SDK resources and stops all timers and recording.
flush() Future<void>
Forces an immediate upload of all queued events.
identify(String userId) Future<void>
Identifies the current user with a unique userId.
init({required String apiKey, String endpoint = 'https://api.sankofa.dev', bool debug = false, bool trackLifecycleEvents = true, bool enableSessionReplay = true, SankofaReplayMode replayMode = SankofaReplayMode.wireframe, int replayFps = 1}) Future<void>
Initializes the Sankofa SDK with your apiKey.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peopleSet(Map<String, dynamic> properties) Future<void>
Sets profile attributes for the current user.
reset() Future<void>
Resets the current user identity and starts a fresh anonymous session.
setPerson({String? name, String? email, String? avatar, Map<String, dynamic>? properties}) Future<void>
A convenience method to set common user traits like name, email, and avatar.
toString() String
A string representation of this object.
inherited
track(String eventName, [Map<String, dynamic>? properties]) Future<void>
Tracks a custom event with optional properties.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance Sankofa
The singleton instance of the Sankofa client.
final