stream_summary_builder 1.0.0 copy "stream_summary_builder: ^1.0.0" to clipboard
stream_summary_builder: ^1.0.0 copied to clipboard

An implementation of `StreamBuilderBase` that folds new stream events into a summary and builds with the summary of stream events seen so far.

stream_summary_builder #

An implementation of StreamBuilderBase that folds new stream events into a summary and builds with the summary of stream events seen so far. Use this class instead of StreamBuilder if you need a widget that represents the summary of all stream event so far instead of just the latest element. A common use case would be building a ListView with elements fetched asynchronously from a paginated Database Query.

T is the type of stream events.

S is the type of interaction summary. Summaries are wrapped in AsyncSnapshot to give the builder access to the ConnectionState. See also:

  • StreamBuilder, which is specialized for the case where only the most recent interaction is needed for widget building.
  • StreamBuilderBase, an abstract class that enables greater customization of summary and connection state behavior.

Any contributions to this package are highly welcome.

Getting Started #

See example/lib/main.dart

2
likes
130
pub points
4%
popularity

Publisher

verified publishercaseycrogers.dev

An implementation of `StreamBuilderBase` that folds new stream events into a summary and builds with the summary of stream events seen so far.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on stream_summary_builder