Skip to main content

smart_repository_generator 0.8.0 copy "smart_repository_generator: ^0.8.0" to clipboard
smart_repository_generator: ^0.8.0 copied to clipboard

Optional code generator for smart_repository data-layer adapters.

0.8.0 #

  • Added value-based pageSync, create, update, and delete operation recipes, eliminating request/commit/map helper callbacks.
  • Added automatic Either<Failure, T> adapters and direct error-mapper tear-offs.
  • Added RepositoryArgument, RepositoryHttpError, and item-level stream mapping.
  • Kept existing symbol/callback recipes backward compatible.

0.7.1 #

  • Added success-type inference from the last generic result argument, including Either<Failure, T>.
  • Added RepositoryOperation.onError for cache cleanup while preserving failures.
  • Added RepositoryOperation.remoteCall for custom multi-argument remote invocation.
  • Broadened compatible Analyzer 10.x versions for existing projects.

0.7.0 #

  • Added @GenerateRepository binding generation from pure domain contracts.
  • Generated public ...Impl classes now own constructors, source fields, contract signatures, coordination, result adaptation, and disposal.
  • Added automatic Future<AppResult<T>> success-type inference, including multi-parameter reads and operations.
  • Added compact RepoMethod.networkFirst, remoteOnly, cacheFirst, cacheOnly, staleWhileRevalidate, and cacheAndNetwork recipes.
  • Added automatic delegation of unconfigured matching cache methods.
  • Kept @GenerateRepositoryImplementation and all older generator modes.

0.6.0 #

  • Added @RepositoryOperation for generated sync/create/update/delete methods.
  • Added per-operation result types, adapters, request factories, local commit callbacks, result mapping, recovery, key selection, and deduplication.
  • Added @RepositoryLocalStream for mapping database streams into domain streams in generated direct repository implementations.
  • Source readers may now return synchronous values as supported by runtime FutureOr callbacks.
  • Added a compiled paginated CRUD example matching Retrofit/ObjectBox-style Clean Architecture projects.

0.5.2 #

  • Added @GenerateRepositoryImplementation for generating concrete Clean Architecture repository implementations instead of separate coordinators.
  • Added request-body generation, application result adapters, class-level mapping defaults, automatic local-source forwarding, and generated disposal.

0.5.1 #

  • Added multi-parameter methods using generated composite record keys while preserving positional, named, optional, and default arguments.
  • Added retainKeyedRepository: false for one-shot or sensitive requests that must release their generated key and state after completion.

0.5.0 #

  • Added declarative @GenerateSmartRepository<Remote, Local>() definitions.
  • Added @RepositoryMethod plus policy annotations: @NetworkOnly, @CacheOnly, @CacheFirst, @NetworkFirst, @StaleWhileRevalidate, and @CacheAndNetwork.
  • Added generated single-value/keyed coordinators with automatic SmartRepository/MappedRepository selection from source return types.
  • Added mapper symbols, source-method overrides, writer inference, max-age, persistence, fallback, error mapping, core access, and disposal.
  • Added runnable Clean Architecture example with generated mapped cache flow.
  • Kept all 0.4.1 manual and adapter-mixin APIs compatible.

0.4.1 #

  • Expanded API documentation for policies, configuration, results, states, sources, observers, mapping adapters, and generated hooks.
  • Improved setup and code-generation guidance.
  • Kept all manual SmartRepository, MappedRepository, and family APIs unchanged.

0.4.0 #

  • Added optional generator annotations for single and keyed mapped repository delegates. Existing manual construction APIs remain unchanged.

0.3.0 #

  • Added MappedRepository<T, R, L> and keyed mapped repositories for clean DTO/local-model/domain-entity boundaries.
  • Added RepositoryResult.fold, match, and getOrThrow adapters.
  • Added explicit setLocal coordination for mutation results.

0.2.0 #

  • Added SmartRepositoryFamily<K, T> for isolated keyed repositories.
  • Added framework-neutral RepositoryObserver<T> lifecycle hooks.
  • Added keyed observer context and safe observer error isolation.
  • Added family removal, bulk invalidation, and lifecycle management.

0.1.0 #

  • Initial policy-driven repository release.
0
likes
140
points
67
downloads

Documentation

API reference

Publisher

verified publisherpinz.dev

Weekly Downloads

Optional code generator for smart_repository data-layer adapters.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

analyzer, build, smart_repository, source_gen

More

Packages that depend on smart_repository_generator