update<DataT extends Data> method
updates a DataT and returns the respons
Implementation
Future<String?> update<DataT extends Data>(
DataT? data, {
Data? caller,
bool forceUpdate = false,
}) async {
final requestType = Helper.SimulatedRequestType.PUT;
await _touchPrueferIfNeeded(
requestType: requestType,
data: data,
caller: caller,
);
return _run(
itPrefersCache: _dataPrefersCache(caller, type: requestType),
offline: () => local.update(data, caller: caller),
online: () => remote.update(data),
requestType: requestType,
).last;
}