update method

  1. @override
Future<Map<String, dynamic>> update (
  1. String id,
  2. Map<String, dynamic> data,
  3. [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.


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);