NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #4085 most downloaded on pub.dev
A Brick domain that routes data fetching through local providers before remote providers.
Last release 11 months ago
01 Nov 2025
Release timing varies
gaps range from 2 weeks to 11 months
Most releases are documented
notes for 25 of 28 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
40 releases · first in 2020
One column per quarter.
Hydrate the memory cache when using destructiveLocalSyncFromRemote
Fix never-completing Future on #reset
#reset (#552)BREAKING CHANGE Require brick_core: >= 2.0.0 and remove support for Query(providerArgs:); see migration steps
brick_core: >= 2.0.0 and remove support for Query(providerArgs:); see migration steps3.4.0Update analysis to modern lints
brick_core to 1.3.0OfflineFirstRepository#exists behavior: the check against memory cache will only return true if results have been found, otherwise it will continue to the SQLite providerOfflineFirstRepository#subscribe streams to their callers (@sonbs21 #484)Added subscriptionByQuery to OfflineFirstRepository#notifySubscriptionsWithLocalData to pass a custom map of StreamControllers
subscriptionByQuery to OfflineFirstRepository#notifySubscriptionsWithLocalData to pass a custom map of StreamControllersGetFirstMixin for convenient retrieval of the first results of OfflineFirstRepository#getOfflineFirstRepository#subscriptions and clear the map on OfflineFirstRepository#resetAdd OfflineFirstSerdes#toSupabase abstract method
OfflineFirstSerdes#toSupabase abstract methodApply desired policy to all association fetches during OfflineFirstRepository#get requests. Fixes #371.
OfflineFirstRepository#get requests. Fixes #371.Respect awaitRemote policy for OfflineFirstRepository#get - fixes a bug where an instance in memory cache would early-return before hitting remote des
awaitRemote policy for OfflineFirstRepository#get - fixes a bug where an instance in memory cache would early-return before hitting remote despite the requested await or alwaysHydrate policy- Support Dart 3
Permit awaiting remote on first get in OfflineFirstRepository#subscribe. While the default for the policy argument of this method has changed, it was
get in OfflineFirstRepository#subscribe. While the default for the policy argument of this method has changed, it was unapplied (.localOnly was used regardless).Resolve concurrent modification error when looping through subscriptions
Remove brick_offline_first_abstract
brick_sqlite_abstractbrick_offline_first_abstractOfflineFirstRepository#subscribe. The query provided when invoked is stored on the repository. Whenever data is locally mutated with storeRemoteResults or upsert or delete that matches one of these stored queries, the stream receives the latest data for the query. It is strongly recommended to store the subscription after creating the stream and listening to it; cancelling the stream will close it and remove the stream to prevent memory leaks.fieldsToOfflineFirstRuntimeDefinition to OfflineFirstAdapter. This exposes @OfflineFirst(where configuration to repositoriesapplyToRemoteDeserialization to @OfflineFirst. When true (the default and existing behavior), deserializing methods will query based on where configurationNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Set default of 5 seconds for RequestSqliteCacheManager#processingInterval
RequestSqliteCacheManager#processingIntervalInclude type argument on _upsertLocal within #upsert
_upsertLocal within #upsertLoosen dependency restrictions to major versions
brick_sqliteNothing published for this version
BREAKING CHANGE requireRemote has been removed from get() and getBatched(). Instead, use policy: OfflineFirstGetPolicy.alwaysHydrate
requireRemote has been removed from get() and getBatched(). Instead, use policy: OfflineFirstGetPolicy.alwaysHydratehydrateUnexisting has been removed from get(). Instead, use policy: OfflineFirstGetPolicy.awaitRemoteWhenNoneExist (this is the default).alwaysHydrate has been removed from get(). Instead, use policy: OfflineFirstGetPolicy.alwaysHydrate.OfflineFirstWithRest domain. Please add brick_offline_first_with_rest: any to your pubspec.yaml and update package imports appropriately.brick_offline_first_with_PROVIDER_abstract packagesrest properties have been removed from OfflineFirstException. Use OfflineFirstWithRestException instead from brick_offline_first_with_rest.GraphqlOfflineRequestQueue to support offline caching within the GraphqlProviderapplyPolicyToQuery to OfflineFirstRepository to add the policy before requests are made to remote providers.OfflineFirstDeletePolicy, OfflineFirstGetPolicy, and OfflineFirstUpsertPolicy to override default behaviordelete now supports requiring a successful remote with OfflineFirstDeletePolicy.requireRemote. If the app is offline, normally handled exceptions (ClientException and SocketException) are rethrown. (#182)upsert now supports requiring a successful remote with OfflineFirstUpsertPolicy.requireRemote. If the app is offline, normally handled exceptions (ClientException and SocketException) are rethrown.RequestSqliteCacheManager to RestRequestSqliteCacheManagerOfflineQueueHttpClient to RestOfflineQueueClientOfflineRequestQueue to RestOfflineRequestQueueNothing published for this version
Add applyPolicyToQuery to OfflineFirstRepository to add the policy before requests are made to remote providers.
applyPolicyToQuery to OfflineFirstRepository to add the policy before requests are made to remote providers.BREAKING CHANGE requireRemote has been removed from get() and getBatched(). Instead, use policy: OfflineFirstGetPolicy.alwaysHydrate
OfflineFirstDeletePolicy, OfflineFirstGetPolicy, and OfflineFirstUpsertPolicy to override default behaviordelete now supports requiring a successful remote with OfflineFirstDeletePolicy.requireRemote. If the app is offline, normally handled exceptions (ClientException and SocketException) are rethrown. (#182)upsert now supports requiring a successful remote with OfflineFirstUpsertPolicy.requireRemote. If the app is offline, normally handled exceptions (ClientException and SocketException) are rethrown.requireRemote has been removed from get() and getBatched(). Instead, use policy: OfflineFirstGetPolicy.alwaysHydratehydrateUnexisting has been removed from get(). Instead, use policy: OfflineFirstGetPolicy.awaitRemoteWhenNoneExist (this is the default).alwaysHydrate has been removed from get(). Instead, use policy: OfflineFirstGetPolicy.alwaysHydrate.Nothing published for this version
BREAKING CHANGE This package no longer includes the OfflineFirstWithRest domain. Please add brick_offline_first_with_rest: any to your pubspec.yaml an…
OfflineFirstWithRest domain. Please add brick_offline_first_with_rest: any to your pubspec.yaml and update package imports appropriately.brick_offline_first_with_PROVIDER_abstract packagesrest properties have been removed from OfflineFirstException. Use OfflineFirstWithRestException instead from brick_offline_first_with_rest.Add GraphqlOfflineRequestQueue to support offline caching within the GraphqlProvider
GraphqlOfflineRequestQueue to support offline caching within the GraphqlProviderRequestSqliteCacheManager to RestRequestSqliteCacheManagerOfflineQueueHttpClient to RestOfflineQueueClientOfflineRequestQueue to RestOfflineRequestQueueCarry providerArgs from query when using getBatched
providerArgs from query when using getBatched (#200)BREAKING CHANGE Field types in models Set >, List >, and Future are no longer supported. Instead, use Set , List , and OfflineFirstModel (the adapters…
'$HTTP_JOBS_CREATED_AT_COLUMN ASC, $HTTP_JOBS_ATTEMPTS_COLUMN DESC, $HTTP_JOBS_UPDATED_AT ASC' to '$HTTP_JOBS_CREATED_AT_COLUMN ASC'; this uses the job column introduced in 0.0.7 (26 May 2020) and will not affect any implementations using 0.0.7 or higher.RequestSqliteCache no longer queries cached requests based on headers; requests are rediscovered based on their encoding, URL, request method, and body. Rehydrated (reattempted) requests will be hydrated with headers from the original request.Set<Future<OfflineFirstModel>>, List<Future<OfflineFirstModel>>, and Future<OfflineFirstModel> are no longer supported. Instead, use Set<OfflineFirstModel>, List<OfflineFirstModel>, and OfflineFirstModel (the adapters will await each).StubOfflineFirstWithRest is functionally changed. SQLiteFFI has satisfied much of the original stubbing required for this class, and http's testing.dart library is sufficient to not require Mockito. Therefore, verify calls will no longer be effective in testing on the client. Instead, pass StubOfflineFirstWithRest.client to your RestProvider#client with the response values. StubOfflineFirstWithRestModel has been removed. Please review Offline First Testing for implementation examples.OfflineRequestQueue. This will avoid simultaneous DB writes on different isolates* while a previous operation is still performing.*Or sub routines? Microtasks? It's unclear how Timer moves its work to the background or how to force it to remain in the original "thread."
Nothing published for this version
Nothing published for this version
Add `mixins.dart` for non essential but still regularly requested features that depend on a specific format of remote data or are useful variations of
mixins.dart for non essential but still regularly requested features that depend on a specific format of remote data or are useful variations of existing features. DeleteAllMixin and DestructiveLocalSyncFromRemoteMixin are the first two such mixins.RequestSqliteCache#findRequestInDatabase for subclass methods. (#111)BREAKING CHANGE One-to-many and many-to-many SQLite associations are no longer stored as JSON-encoded strings (i.e. [1, 2, 3] in a varchar column). Jo…
[1, 2, 3] in a varchar column). Join tables are now generated by Brick. To convert existing data, please refer to the brick_sqlite CHANGELOG notes. If you do not care about existing migration and have not widely distributed your app, simply delete all existing migrations, delete all existing app installs, and run flutter pub run build_runner build in your project root.hydrate offline. The remote provider would return null, and SQLite/memory cache would not adequately store results. Instead, when a null response is returned from the remote provider, subsequent provider updates are skipped.OfflineFirstWithRest#upsert (such as 404, 50x).BREAKING CHANGE Remove StubSqlite from StubOfflineFirst. SQLite should be migrated by the repository and data upserted as it would be within the app.…
reattemptForStatusCode for OfflineFirstWithRestRepository#upsert requests. When the response matches a reattempt code, an exception is not thrown and the instance is returned instead.501 to OfflineQueueHttpClient#reattemptForStatusCode defaultscreated_at column for the OfflineRequestQueue.StubOfflineFirst is now only concerned with REST responses.OfflineRequestQueue in favor of declaring it once on RequestSqliteCacheManager. To migrate, pass a custom RequestSqliteCacheManager with the interval time to the OfflineFirstWithRestRepository constructor.StubOfflineFirstWithRest must be invoked synchronously (in order to run migrations). When setting up stub in testing, call await StubOfflineFirstWithRest(...).initialize() or, in a cleaner syntax, final stub = StubOfflineFirstWithRest(...); await stub.initialize(). initialize will no longer be automatically invoked.Remove maximumRequests configuration for the OfflineFirstQueue. One request should be processed at a time in serial
OfflineRequestQueue#process became a protected methodRequestSqliteCacheManager to interact with the queue. This new class receives most static methods from RequestSqliteCache.OfflineRequestQueue#requestManager to access queue via a RequestSqliteCacheManager instance.RequestSqliteCache.unprocessedRequests to RequestSqliteCacheManager.prepareNextRequestToProcess as the expected query only returns one locked row at a time.RequestSqliteCacheManager.prepareNextRequestToProcess locks all unprocessed rows, not just the first oneserialProcessing for OfflineRequestQueueOfflineFirstWithRestRepository#offlineRequestQueue is now protectedisConnected member from OfflineFirstRepository and associated Connectivity code. The connection should not matter to the subclass as it, or a supporting class, should track outbound requests.- Bump dependencies
Rename Query#params to Query#providerArgs, reflecting the much narrower purpose of the member
Query#params to Query#providerArgs, reflecting the much narrower purpose of the memberExport REST annotations/classes from OfflineFirstWithRestRepository for convenient access
OfflineFirstWithRestRepository for convenient accessMemoryCacheProvider in OfflineFirstWithRestRepository as it's not required for OfflineFirstRepositoryNothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →