ChatPluginPlatform class abstract
The interface that implementations of chat_plugin must implement.
Platform implementations should extend this class rather than implement it as chat_plugin
does not consider newly added methods to be breaking changes. Extending this class
(using extends) ensures that the subclass will get the default implementation, while
platform implementations that implements this interface will be broken by newly added
ChatPluginPlatform methods.
- Inheritance
-
- Object
- PlatformInterface
- ChatPluginPlatform
- Implementers
Constructors
- ChatPluginPlatform()
- Constructs a ChatPluginPlatform.
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
-
dispose(
) → void - Cleans up resources used by the plugin.
-
initialize(
{required String domain, required String chatbotId}) → Future< void> - Initializes the chat plugin with the necessary configuration.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
streamResponse(
{required String message, String? threadId}) → Stream< Map< String, dynamic> > - Sends a message and returns a stream of structured responses from the backend.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ ChatPluginPlatform
-
The default instance of ChatPluginPlatform to use.
getter/setter pair