update<DataT extends Data> method
updates a DataT
and returns the response
Implementation
Future<String?> update<DataT extends Data>(
DataT? data, {
Data? caller,
bool forceUpdate = false,
}) async {
//offline procedure, needs some stuff changed and added..
debugPrint(data.toString());
if (
// (forceUpdate ||
// caller != null ||
// typeOf<DataT>() == typeOf<InspectionLocation>()) &&
data != null) {
await storeData<DataT>(data, forId: caller?.id ?? await API().rootID);
return 'success';
}
return null;
}