RxStreamBuilder<T> constructor

const RxStreamBuilder<T>({
  1. required Stream<T> stream,
  2. required AsyncWidgetBuilder<T> builder,
  3. T? initialData,
  4. int? valuesSnapshotIndex,
  5. Key? key,
})

Creates a new RxStreamBuilder that builds itself based on the latest snapshot of interaction with the specified stream and whose build strategy is given by builder.

If the given stream is of a type that stores data like a BehaviorSubject, ReplaySubject or a variant it's stored data will be used for the inner StreamBuilder's initial data giving a measurable performance improvement.

The initialData is used to create the initial snapshot.

The stream must not be null. The builder must not be null.

Implementation

const RxStreamBuilder({
  required this.stream,
  required this.builder,
  this.initialData,
  this.valuesSnapshotIndex,
  Key? key,
}) : super(key: key);