Skip to content

Instantly share code, notes, and snippets.

@victoire-hergan
victoire-hergan / gist:04110c88bfbf7c41dc5ec12a9a436969
Created February 11, 2025 17:13
Stream response from a deployed flow
static const String _flowStreamDelimiter = '\n\n';
static StreamFlowResponse<O, S> streamFlow<O, S>({
required String url,
dynamic input,
Map<String, String>? headers,
}) {
// Create a StreamController to manage the stream of messages
final controller = StreamController<S>();