SolevatoClient class FlutterClientSdk
Represents a solevato client instance. All solevato operations (Example: sendMessages) are passed through solevato client.
Properties
- baseUrl → String
-
no setter
- callbacks → SolevatoCallbacks?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inboxIdentifier → String
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- user → SolevatoUser?
-
final
Methods
-
clearClientData(
) → dynamic - Clears all solevato client data
-
dispose(
) → dynamic - Disposes solevato client and cancels all stream subscriptions
-
loadMessages(
) → void - Retrieves solevato client's messages. If persistence is enabled SolevatoCallbacks.onPersistedMessagesRetrieved will be triggered with persisted messages. On successfully fetch from remote server SolevatoCallbacks.onMessagesRetrieved will be triggered
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendAction(
SolevatoActionType action) → Future< void> - Send solevato action performed by user.
-
sendMessage(
{required String content, required String echoId}) → Future< void> -
Sends solevato message. The echoId is your temporary message id. When message sends successfully
SolevatoMessage will be returned with the
echoId
on SolevatoCallbacks.onMessageSent. If message fails to send SolevatoCallbacks.onError will be triggeredechoId
as data. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
providerContainerMap
↔ Map<
String, ProviderContainer> -
getter/setter pair
Static Methods
-
clearAllData(
) → Future< void> - Clears all persisted solevato data on device.
-
clearData(
{required String baseUrl, required String inboxIdentifier, String? userIdentifier}) → Future< void> - Clears all persisted solevato data on device for a particular solevato client instance. See getClientInstanceKey on how solevato client instance are differentiated
-
create(
{required String baseUrl, required String inboxIdentifier, SolevatoUser? user, bool enablePersistence = true, SolevatoCallbacks? callbacks}) → Future< SolevatoClient> -
Creates an instance of SolevatoClient with the
baseUrl
of your solevato installation,inboxIdentifier
for the targeted inbox. Specify custom user details usinguser
andcallbacks
for handling solevato events. By default persistence is enabled, to disable persistence setenablePersistence
as false -
getClientInstanceKey(
{required String baseUrl, required String inboxIdentifier, String? userIdentifier}) → String - Create a solevato client instance key using the solevato client instance baseurl, inboxIdentifier and userIdentifier. Client instance keys are used to differentiate between client instances and their data (contact (SolevatoContact),conversation (SolevatoConversation) and messages (SolevatoMessage))