repository 4.0.1 copy "repository: ^4.0.1" to clipboard
repository: ^4.0.1 copied to clipboard

A reactive repository toolkit for Flutter with HTTP, caching, dependency tracking, auto refresh, and UI integration.

4.0.1 - 2026-09-23 #

  • Allow cupertino_http 3.x (>=2.3.0 <3.2.0) for Swift Package Manager / Native Assets support, while keeping compatibility with 2.3.x.

4.0.0-dev.1 Unreleased #

  • Add configurable, isolated RepositoryClient instances.
  • Add BaseRepository.config for a default client captured by new repository instances while preserving optional per-repository overrides.
  • Add base URL resolution with typed relative and absolute repository URLs.
  • Add ordered RepositoryInterceptor middleware with replay support.
  • Add external typed action factories whose runs receive RepositoryClient, return Either, and update repository state only on Right.
  • Remove the legacy mutate interface; repository writes now use typed actions.
  • Merge the Flutter integration into the main repository package.
  • Pass the complete RepositoryState<Data> to RepositoryBuilder callbacks so consumers retain state metadata and handle states exhaustively.
  • Model content availability as RepositoryStatePending, RepositoryStateReady, or RepositoryStateError, while preserving ready stale data when a background refresh fails.
  • Add repository dependencies, nullable resolution, hydration coordination, and exception-safe fibers.
  • Separate cache hydrate() from remote refresh() and expose the initial hydration future instead of a coordination completer.
  • Add multi-method HTTP requests, request bodies, mocks, token builders, platform-specific clients, and network-unavailable errors.
  • Default requests with bodies to Content-Type: application/json while preserving explicitly provided content types.
  • Make the package:http transport injectable with explicit ownership and a uniform client close lifecycle.
  • Make ZipRepository react to changes from its child repositories.
  • Replace the old Repository base class with BaseRepository and use Repository as the concrete HTTP implementation.
  • Move HiveRepositoryCacheStorage into the optional repository_cache_hive adapter package so the core no longer depends on Hive.

3.0.0 - 2023-05-22 #

  • Major rewrite of all repository package to be more efficient and gracefully handle the different cache strategies, using hive as default and adding Zip repository.

2.0.0 - 2019-10-02 #

  • Major rewrite of CachedRepository so that it returns CacheItem<Item> instead of Items. This is a breaking change as it's no longer mutable. But it allows for cooler advanced functionality as it offers new information to users.

1.0.4 - 2019-10-01 #

  • Add OnlyCollectionFetcher.

1.0.3 - 2019-09-13 #

  • Major rewrite of CachedRepository to be more efficient and gracefully handle the different cache strategies as well as caches yielding multiple values.

1.0.2 - 2019-09-09 #

  • CachedRepository allowing multiple cache strategies.

1.0.1 - 2019-09-09 #

  • Minor fixes allowing fetch stream subscription to be closed after first event.

1.0.0 - 2019-09-06 #

  • Removed unnecessary dependencies flutter, hive, path_provider, provider and shared_preferences.
  • Fixed pubspec description and homepage.
  • Added example.

0.0.1 - 2019-08-22 #

  • Initial release with basic Repository and Id structure, as well as InMemoryStorage, Transformer, ObjectToJsonTransformer, JsonToStringTransformer, and CachedRepository.
9
likes
150
points
469
downloads

Documentation

API reference

Publisher

verified publisheryanncabral.dev

Weekly Downloads

A reactive repository toolkit for Flutter with HTTP, caching, dependency tracking, auto refresh, and UI integration.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

crypto, cupertino_http, dartz, equatable, flutter, http, meta, retry, rxdart

More

Packages that depend on repository