delete<_Model extends OfflineFirstWithRestModel> method
Future<bool>
delete<_Model extends OfflineFirstWithRestModel>(
- _Model instance, {
- OfflineFirstDeletePolicy policy = OfflineFirstDeletePolicy.optimisticLocal,
- Query? query,
Remove a model from SQLite and the remoteProvider
Implementation
@override
Future<bool> delete<_Model extends OfflineFirstWithRestModel>(
_Model instance, {
OfflineFirstDeletePolicy policy = OfflineFirstDeletePolicy.optimisticLocal,
Query? query,
}) async {
try {
return await super.delete<_Model>(instance, policy: policy, query: query);
} on RestException catch (e) {
logger.warning('#delete rest failure: $e');
if (_ignoreTunnelException(e)) {
return false;
}
throw OfflineFirstException(e);
}
}