ZipRepository<Data> constructor

ZipRepository<Data>({
  1. required List<Repository> repositories,
  2. required Data zipper(
    1. List streams
    ),
  3. Duration? autoRefreshInterval,
  4. String? name,
  5. bool resolveOnCreate = true,
})

Creates a ZipRepository that combines multiple Repositorys into one. It takes a list of Repositorys and a zipper function. The zipper function takes a list of streams and returns a single stream. The zipper function is called every time one of the Repositorys emits a new value.

Implementation

ZipRepository({
  required this.repositories,
  required Data Function(List<dynamic> streams) zipper,
  super.autoRefreshInterval,
  String? name,
  super.resolveOnCreate,
})  : _zipper = zipper,
      _name = name;