DOOClient class FlutterClientSdk
Represents a DOO client instance. All DOO operations (Example: sendMessages) are passed through DOO client. For more info visit https://www.doo.ooo/docs/product/channels/api/client-apis
Properties
- baseUrl → String
-
no setter
- callbacks → DOOCallbacks?
-
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 → DOOUser?
-
final
Methods
-
clearClientData(
) → dynamic - Clears all DOO client data
-
dispose(
) → dynamic - Disposes DOO client and cancels all stream subscriptions
-
loadMessages(
) → void - Retrieves DOO client's messages. If persistence is enabled DOOCallbacks.onPersistedMessagesRetrieved will be triggered with persisted messages. On successfully fetch from remote server DOOCallbacks.onMessagesRetrieved will be triggered
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendAction(
DOOActionType action) → Future< void> - Send DOO action performed by user.
-
sendMessage(
{required String content, required String echoId}) → Future< void> -
Sends DOO message. The echoId is your temporary message id. When message sends successfully
DOOMessage will be returned with the
echoId
on DOOCallbacks.onMessageSent. If message fails to send DOOCallbacks.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 DOO data on device.
-
clearData(
{required String baseUrl, required String inboxIdentifier, String? userIdentifier}) → Future< void> - Clears all persisted DOO data on device for a particular DOO client instance. See getClientInstanceKey on how DOO client instance are differentiated
-
create(
{required String baseUrl, required String inboxIdentifier, DOOUser? user, bool enablePersistence = true, DOOCallbacks? callbacks}) → Future< DOOClient> -
Creates an instance of DOOClient with the
baseUrl
of your DOO installation,inboxIdentifier
for the targeted inbox. Specify custom user details usinguser
andcallbacks
for handling DOO events. By default persistence is enabled, to disable persistence setenablePersistence
as false -
getClientInstanceKey(
{required String baseUrl, required String inboxIdentifier, String? userIdentifier}) → String - Create a DOO client instance key using the DOO client instance baseurl, inboxIdentifier and userIdentifier. Client instance keys are used to differentiate between client instances and their data (contact (DOOContact),conversation (DOOConversation) and messages (DOOMessage))