StreamBuilder<T> class

Similar to Flutters StreamBuilder but without AsyncSnapshot. Constantly rebuild something depending of the last value of a stream. Optional you can set an errorBuilder to handle errors.

Example:

StreamBuilder<String>(
  stream: someDataStream,
  builder: (AsyncSnapshot<String> snapshot, Widget parent) =>
    divElement(text: snapshot.data ?? snapshot.error?.toString() ?? 'No data yet'),
).appendTo(this);
Inheritance

Constructors

StreamBuilder({required Stream<T> stream, required Widget builder(BuildContext context, AsyncSnapshot<T> value)})

Properties

builder Widget Function(BuildContext context, AsyncSnapshot<T> value)
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<T>
final

Methods

createState() StateWidget<StreamBuilder<T>>
override
inflate(BuildContext context) → void
Set this widget context, build it’s child, and render the widget, updating Context.element When overriding pay attention that inflate need to call build and render
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(BuildContext context) Element
Render the DOM element and add it to the context.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited