- Fix: Flush Hive on relationship save
- Feature: Optionally prevent client closing in
sendRequest
- Fix: builder to support
DataModelMixin
- Fix: guards and test for uninitialized models
- Feature: Introduce
DataModelMixin
- Fix: Offline retries failures on reinitialization
- Fix: Bug in local storage destroy method
- Fix: findAll should not be nullable
withKeyOf
bug with Freezed classes fixed
- Support non-JSON responses, use content type if present
- Handle HTTP 304
- Improve graph compacting
withKeyOf
bugfix (#218)
- Move graph clearing to standalone
compact()
function
- Make localAdapter findAll non-nullable again
- Remove keys in graph when calling
clear
, deleteAll extension - Upgrade dependencies
- Upgrade dependencies
- Allow overriding
LocalAdapter
(useful for Hive migrations by overridingdeserialize
) - Support Flutter web again (thanks @ariejan)
sendRequest
supports binary data
- Fix and improve clear watcher updates
- Local findAll only return null if not touched and empty
- Clear should also notify watchers
- Offline auto-retry and other improvements
- Gracefully recover from corrupt boxes (LocalStorageClearStrategy.whenError)
- Fix key overrides (issue #180)
- Relax dependency constraints so it can be used with dart 2.17
- Upgrade dependencies, including Riverpod 2.x
- Improve offline
- Improve internal types to fix an issue with release mode on web
- Ensure we always get a key initializing the provider
- Ignore and delete malformed offline operations
- Allow passing hive typeIds manually
- Make graph throttle duration zero for tests
- More documentation, tests and coverage
- Revert (temporarily) request ordering
- Clean up
- Ordered requests feature: if a previous request arrives later it won't be saved in local storage
- Models are always automatically initialized and never automatically saved
- Reorganized and cleaned up
DataModel
API
- Hotfix: revert 9854a590fca5f73063636750911fe63bd4327f79
- Allow easier overriding of
init
- Improved logging
init
is no longer by default required (can be switched off viaautoInitializeModels
)- Everything is now only accessed via
ref.$model
- Support for
background
loading - New labels API to log and track requests, multiple log levels, nested labels
- New
finder
API to supply an alternative finder to watchers (ex strategies) - Lots of improvements to serialization including async API for
serialize
,deserialize
), introduced thewithRelationships
flag toserialize
- Allow graph notifier to be throttled via the new
graphNotifierThrottleDurationProvider
- Improved
alsoWatch
API, can now watch any arbitrary relationship in the graph OnSuccess
/OnError
callback APIsgetIdForKey
will now returnint
IDs when appropriate- Bug fix: invoking two notifiers with equal arguments will now always yield the same cached notifier
- Misc bug fixes and performance improvements, builder fixes, test improvements
- Upgrade dependencies and use new lints
- Revamp some internal dependency management & testing pipes
- Removed
test.data.dart
(will soon add documentation to test FD-driven apps) - Fix
Relationship
equality
- Fix
DataModel#notifier
getter - Fix #148 where models from local storage would be returned without relationships
- Support Hive
LazyBox
fake intest.data.dart
- Introduce API to create custom fetching and watching strategies in order to develop and reuse providers within adapters; and in this spirit, remove
Repository#watchOneNotifier
andRepository#watchAllNotifier
- Fix broken reload when using functional notifier extensions
- Snake case box names without breaking existing
- Ability for a model to access its
notifier
- Fix path on Windows
- Fix using wrong name for relationships with multiple words in local storage
- Add
relationships()
API; fixwatch()
- Fix issue #141 with
remote=false
by default - Allow nullable relationships in
alsoWatch
- Replace
dynamic
forObject?
- Make some
RemoteAdapter
methods public - Notify in graph if saving with
remote=false
- Fix issue with inverse relationships in Freezed
- Add experimental model watch API
- Fix providers omission in test.data.dart
- Upgrade dependencies to latest
- Simplify example app
- Fixed #125: Error when disposing repositories during tests
- Fixed #131: Allow late final relationships in models for better defaults
- Relationships are no longer collections due to upgrade in Freezed
- Add adapter shortcuts
- Remove DataModel#watch
- Improve null deserialization handling
- Add syntax sugar for repository methods and watchers accessible via
ref.$type
- Add
where
/map
functional extensions onDataStateNotifier
(can use instead offilterLocal
which was removed) - Make
Relationship
aSet
again, allIterable
methods available on it - Improve relationship removal via
BelongsTo.remove()
andHasMany.remove()
- Upgrade Riverpod to 1.0.0 and Freezed to 1.0.0
- Fix for multiple
doneLoading
events
- Throttle workaround, remove value notifier
- Update dependencies
baseDirFn
for web bugfix- Fix watchers dispose, remove forEach extension
- Add filterLocal and syncLocal to watchers
- Ensure model is persisted even if already initialized
- Allow bool save in DataModel
init
- Fix minor issue serialization
- Improve tests around serialization edge cases
- Migrate to null safety
- Upgrade offline operations design
- Fix graph persistence issues
- Notifier
throttle
helper now takes aDuration Function()
argument - Make
syncLocal=false
the default - Fix flashing screen with
filterLocal
- Misc watcher fixes
- Update logging style
- Offline support for all types of requests, including ad-hoc requests via
sendRequest
- Fix
typeId
management and issues aroundclear
- Fix graph persistence issues
- Initialize graph externally (codegen)
- Remove
clearAll
(use generatedrepositoryProviders
+clear
for each one) - Fix bugs related to
type
s, internal types - Misc utils fixes
- Fix singular/plural types, fix remote default
- Allow specifying remote default value via
@DataRepository
- Allow
type
to be overridable - Implemented offline-supporting APIs:
offlineSaved
,offlineDeleted
,offlineSync
,offlineClear
- Offline handling in
watchAll
,watchOne
andsave
- Fix
addInverse
issue - Fix initialization issues
- Make relationship collection-like, rework equality, fixes #88
- Improvements to
data_state
- Restore functional
sendRequest
API, addE
type param - Unify adapters into one main adapter graph and sort, closes #78
- Remove
Provider
andGetIt
built-in support, can easily be done with documented extensions
- Fix
test.data.dart
imports
- Fix type issues
- Add inverses to initialized belongsto relationships
- Support
onError
onsave
- Notifier
updateWith
feature
- Add
syncLocal
andfilterLocal
features - Make
save
optimistic - Use default headers & params by default in
sendRequest
- Include
data_state
package within Flutter Data, upgrade others - Fix bug with related model updates in
alsoWatch
- Fix initialization and refresh issues
- Fix empty response handling
- Fix URI helpers broken on web
- Allow specifying remoteType (useful for the JSON:API adapter)
- Always return Riverpod
StateNotifierProvider
s (notStateNotifierStateProvider
s)
- repositoryInitializerProvider is now fully restartable via riverpod ref.container.refresh
- if can't channel error through notifier then throw
- fix watchAll event handling
- add testing support
- fix onError callback
- guard onDispose with ref.mounted
- fix faulty data_state
- TODO since 0.5.9
- fix clearAll
- Upgrade dependencies
- Fix clearing boxes
- Fix
fieldForKey
/keyForField
in attributes
- Upgrade to Riverpod 0.10.x
- Upgrade to Riverpod 0.6.x
- Allow passing a repository to init() and generate dartdoc
- Expose adapter in DataModel, useful for extensions
- [bugfix] Adapter codegen related to models with a DataModel parent
- [bugfix] Type to string camelCase issue
- [internals] Simplify local storage
- Riverpod support
get_it
support- Flutter Web support
- Self-reference relationship support
DataSupport
is nowDataModel
and it's a mixin- Redesign and reorganization for more API stability
- New
httpClient
andsendRequest
for custom endpoints - Default params & headers now called
defaultParams
anddefaultHeaders
- JSON serializer adapter is now included by default
- Move
JSONAPIAdapter
to separate package - Expose graph API to external adapters
- Tons of small issues fixed
- 90%+ test coverage
- Dart docs
- New serializer API with
DeserializedData
- Adapt, fix & merge
StandardJSONAdapter
into core, no longer required as adapter - New
DataSupport#init(manager, key, save)
API shouldLoadRemoteAll
,shouldLoadRemoteOne
APIs- Misc optimizations
- Test infrastructure fixes
- Throttle graph events, configure duration via
throttleDuration
ofWatchAdapter
- Namespaced graph for custom adapters wanting to leverage graph capabilities
- JSON API adapter fixes
- Removed
DataSupportMixin
: onlyDataSupport
left, can be used as class or mixin - Possible to leave models uninitialized (i.e. empty models used in forms)
DataSupport#save
,DataSupport#watch
,DataSupport#delete
will auto-initialize- Misc fixes and vastly improved
watch*
tests
- Stabilize API (including
data_state
upgrade) - Ensure to reset exceptions in
watchOne
bugfix DataSupportMixin
manualinit
now takes aDataManager
argument- Clean up and minor fixes/additions in tests
- Flutter Data is now Adapter-based from the core
- New engine powering relationships and metadata, based on a persitent graph notifier
- Configurable inverses via
@DataRelationship
- Notifiers and
watch
ing APIs vastly improved,alsoWatch
, allow to work without IDs DataSupport
now hasreload
,watch
,delete
(that can also work without IDs)- Revamped JSON adapters;
fieldForKey
API - De-pollute models (only carries a
_flutterDataMetadata
map) - Remove
IdDataSupport
for Freezed, no longer needed - Use
Set
s for relationships - Relationships MUST be final
- Upgrade
data_state: ^0.3.0
andjson_api: ^4.2.1
, droprxdart
- Massive testing improvements
- new
repositoryFor
API, useful for serialization adapters - JSON:API adapter includes bugfix
Repository#dumpLocal
to dump the contents of this repository local storageRepository#remote
flag (closes #30)- verbose flag (closes #18)
- allow passing Hive AES encryption key (closes #29)
- new urlFor* API
- default params (closes #27)
- normalize params/headers
- delete keys when deleting models
- minor API fixes
- builder hotfix
- revamped URL design
- fix API consistency
- misc fixes
- add toJson support for different freezed kinds
- improved query parameters
- improved docs
- fix dependency issues
- Make
json_serializable
optional - Make type arguments in adapters optional
- Generate
dataProviders
only if 'provider' is a dependency
- Optional
fromJson
/toJson
- Package fixes and documentation
- Make linter and pana happy
- Release to pub
- Revamp serialization system
- Added standard json and JSON:API adapters
- Better relationship support
- Auto/manual model initialization modes
- Allow nullable relationships
- Misc refactoring
- More test coverage
- Allow
DataId
to holdnull
IDs and save ID-less models - Fix relevant unit & integration tests
- Fix
also
API inDataManagerX
extension - Improve tests
- Initial commit