StreamBuilder
Rebuilds with the latest AsyncSnapshot of stream — each event,
error, and close. Cancels its subscription on dispose and re-subscribes
only when the stream identity changes.
Learn more: Loading data
Import: package:fleury/fleury.dart, or package:fleury/fleury_core.dart in browser code.
StreamBuilder<int>( stream: ticks, initialData: 0, builder: (context, snapshot) => Text('tick ${snapshot.data ?? 0}'),)Constructors
Section titled “Constructors”StreamBuilder()
Section titled “StreamBuilder()”| Parameter | Type | Default | Description |
|---|---|---|---|
stream: | Stream<T>? | required | The stream to observe. A null stream stays disconnected. |
initialData: | T? | — | Data exposed before stream emits, or null when there is no seed value. |
builder: | AsyncWidgetBuilder<T> | required | Builds the subtree after each data event, error, and connection change. |
Source
Section titled “Source”StreamBuilder is defined in packages/fleury/lib/src/widgets/async.dart.
Category: State & async · All widgets