repository_kit 0.1.1
repository_kit: ^0.1.1 copied to clipboard
A pure Dart toolkit for implementing clean, offline-first repositories by owning cache-vs-remote strategy decisions.
0.1.1 #
RKitRepositoryis now declared asabstract mixin class. It can be used withextends(unchanged from 0.1.0) or withwithwhen the consuming class already has a base class. No breaking changes.
0.1.0 #
Initial release.
RKitRepository<ResultType, RemoteType>— abstract base class with a two-shotwatch()stream engine.RKitState<T>— sealed state hierarchy with four subtypes:RKitLoading,RKitCache,RKitSuccess,RKitFailure.RKitCachePolicy— controls when the remote fetch is performed. Supportsalways,ifEmpty,never, andstaleIf(closure-based dynamic cache freshness check).RKitRetryPolicy— controls retry behaviour on request failure. Supportsnoneandexponentialbackoff.RKitException— exception type representing infrastructure failures, wrapping the underlying error and stacktrace.