SentianceCore class

Constructors

SentianceCore({SentianceApi? api})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createUser(CreateUserOptions options) Future<CreateUserResult>
Creates a Sentiance user if one does not yet exist.
disableDetections() Future<void>
Disables SDK detections. Currently, this operation always succeeds. However, this behaviour may change in the future.
enableDetections() Future<void>
Enables SDK detections. Requires a Sentiance user to be present on the device. Enabling detections is persistent across app restarts. Therefore, you do not need to call this method on every app startup. Once detections are enabled, as long as the SDK is properly initialized during startup, detections will be resumed, until you disable them by calling [disableDetections].
enableDetectionsWithExpiryDate(int expiryEpochTimeMs) Future<void>
Enables SDK detections. Requires a Sentiance user to be present on the device. Enabling detections is persistent across app restarts. Therefore, you do not need to call this method on every app startup. Once detections are enabled, as long as the SDK is properly initialized during startup, detections will be resumed, until you disable them by calling [disableDetections], or they expire (see [expiryEpochTimeMs]).
getDiskQuotaLimit() Future<int>
Returns the SDK's disk quota limit in bytes. This limit is configured for your app by Sentiance.
getSdkStatus() Future<SdkStatus>
Returns the status of the SDK. You can use this information to identify possible causes for non-existing or low quality detections. The returned object's runtime type is AndroidSdkStatus if invoked on Android, or IosSdkStatus if invoked on iOS.
getUserId() Future<String?>
Returns the Sentiance user ID, or null if a user does not exist.
getUserTags() Future<Map<String, String>>
Returns the tags that are currently set for the Sentiance user, as previously provided to setUserTags. Returns an empty map if no user tags have been set.
getVersion() Future<String>
Returns the native SDK version.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestAccessToken() Future<AccessTokenResult>
Returns the user's API access token.
reset() Future<void>
Resets the Sentiance SDK.
setUserTags(Map<String, String> tags) Future<void>
Sets the tags for the current Sentiance user.
submitDetections() Future<void>
Submits any pending SDK detections to the Sentiance API.
toString() String
A string representation of this object.
inherited
updateSdkNotification(String title, String message) Future<void>
Android only
userExists() Future<bool>
Returns whether a Sentiance user exists on the device.

Operators

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

Static Properties

staticApi ← SentianceApi
Overrides the SentianceApi backing ensureInitialized. Test seam only.
no getter

Static Methods

ensureInitialized() Future<void>
Completes once the Sentiance SDK has finished initializing.