DifyProvider class

Inheritance

Constructors

DifyProvider()

Properties

client DifyClient?
no setter
config DifyConfig?
no setter
conversations List<DifyConversation>
no setter
currentConversation DifyConversation?
no setter
currentUser DifyUser?
no setter
error String?
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isConnected bool
no setter
isLoading bool
no setter
messages List<DifyMessage>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
clearError() → void
Clear error
clearMessages() → void
Clear messages
connectWebSocket() → void
Connect to WebSocket
createConversation({String? name, Map<String, dynamic>? metadata}) Future<void>
Create a new conversation
deleteConversation(String conversationId) Future<void>
Delete conversation
disconnectWebSocket() → void
Disconnect WebSocket
dispose() → void
Discards any resources used by the object.
override
initialize(DifyConfig config) Future<void>
Initialize the Dify client
loadConversation(String conversationId) Future<void>
Load conversation
loadConversations() Future<void>
Load all conversations
loadUserFromStorage() Future<void>
Load user from local storage
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
sendMessage(String content) Future<void>
Send a message
setCurrentUser({required String userId, String? name, String? email, Map<String, dynamic>? metadata}) Future<void>
Create or get current user
toString() String
A string representation of this object.
inherited

Operators

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