dispose method

  1. @override
void dispose()
override

Cleans up resources used by the plugin.

Should be called when the chat functionality is no longer needed, e.g., in the dispose method of a widget state.

Implementation

@override
void dispose() {
  SSEClient.unsubscribeFromSSE();
  _streamController?.close();
  _streamController = null;
  _domain = null;
  _chatbotId = null;
}