setRecord abstract method

Future<bool> setRecord({
  1. required String documentPath,
  2. required Map<String, dynamic> recordMap,
  3. bool merge = true,
})

Set a data to the given documentPath. If the document does not exit at the given documentPath, data will be created. Otherwise, the document will be replaces by the given recordMap.

  • documentPath The path to the document. e.g - "restaurants/{restaurantId}"
  • recordMap The data that will set to the document.
  • merge Using when we went to merge (merge = true) or overwrite (merge = false) the data. by default the data is merged into the existing document.

Implementation

Future<bool> setRecord({
  required String documentPath,
  required Map<String, dynamic> recordMap,
  bool merge = true,
});