update method
- @override
- String id,
- Map<
String, dynamic> data, - [Map<
String, dynamic> params]
POST /:id Overwrites a resource. The existing resource is completely replaced by the new data. This endpoint should return the new resource.
Implementation
@override
Future<Map<String, dynamic>> update(String id, Map<String, dynamic> data,
[Map<String, dynamic> params]) async {
var doc = await collection.document(id).get();
await collection.document(id).set(data);
doc = await collection.document(id).get();
return _mapWithId(doc);
}