hydrate<_Model extends OfflineFirstWithRestModel> method
- @protected
- @override
- bool deserializeSqlite = true,
- Query? query,
Fetch and store results from remoteProvider into SQLite and the memory cache.
deserializeSqlite
loads data from SQLite after they've been inserted. Association queries
can be expensive for large datasets, making deserialization a significant hit when the result
is ignorable. Defaults to true
.
Implementation
@protected
@override
Future<List<_Model>> hydrate<_Model extends OfflineFirstWithRestModel>({
bool deserializeSqlite = true,
Query? query,
}) async {
try {
return await super.hydrate(deserializeSqlite: deserializeSqlite, query: query);
} on RestException catch (e) {
logger.warning('#hydrate rest failure: $e');
}
return <_Model>[];
}