stream property
The stream of Markdown text chunks to render.
Each string emitted by this stream is appended to the accumulated content. The widget will re-render the entire accumulated content on each emission.
Example:
// Creating a simple stream
Stream<String> createMarkdownStream() async* {
yield '# Title\n\n';
await Future.delayed(Duration(milliseconds: 100));
yield 'First paragraph with **bold** text.\n\n';
await Future.delayed(Duration(milliseconds: 100));
yield '## Subtitle\n\n';
yield 'Second paragraph.';
}
StreamMarkdown(stream: createMarkdownStream())
The stream can be a StreamController, a network stream, or any other source that emits string chunks.
Implementation
final Stream<String> stream;