updateMetadata method
Implementation
Future<bool> updateMetadata({
required String tenantId,
required String id,
required Map<String, dynamic> data,
}) async {
try {
var response = await http.put(
Uri.parse(
"${constants.API_HOST}/api/tenant/$tenantId/screen-trace/$id"),
body: jsonEncode(data),
headers: {
"Authorization": token,
'Content-Type': 'application/json; charset=UTF-8',
});
print("RESPONSE updateMetadata " + response.body);
if (response.statusCode == 200) {
return true;
} else {
return false;
}
// return jsonDecode(response.body);
} catch (e) {
print("ERROR updateMetadata " + e.toString());
return false;
}
}