update<T> method
Implementation
Future<bool> update<T>(String key, Map<String, dynamic> value) async {
print(value);
final response = await http.put(
Uri.parse(_url! + '/' + key + '.json'),
body: jsonEncode(value),
);
if (response.statusCode == 200) {
print(response.statusCode);
return true;
} else {
print('Request failed with status: ${response.statusCode}.');
return false;
}
}