sse_source_controllers library

Classes

SseParsedSourceController<T>
Implementation of SseSourceControllerBase where the onErrorEvent and eventParser action can be specified in parameter, allowing configuration of reconnection logic and parsing of each event into a specified object type.
SseSourceController
Implementation of SseSourceControllerBase where the onErrorEvent action can be specified in parameter, allowing configuration of reconnection logic.
SseSourceControllerBase<T>
Base class for SSE source controllers. Manages connection lifecycle and event handling. Sets up the event stream controller with custom onListen and onCancel.
StreamSourceController<T>
Isolation wrapper for StreamController with dispose

Typedefs

ConnectionStreamBuilder = FutureOr<Stream<Map<String, dynamic>>> Function(Client client)
EventErrorAction = FutureOr<void> Function(SseSourceController controller, Object error, StackTrace stackTrace)
ParsedEventErrorAction = FutureOr<void> Function(SseParsedSourceController controller, Object error, StackTrace stackTrace, [Map<String, dynamic>? sourceEvent])