update method

Future<bool> update(
  1. String path,
  2. Map<String, dynamic> data
)

Implementation

Future<bool> update(String path, Map<String, dynamic> data) async {
  bool update = true;
  try {
    final DocumentReference ref = _collection!.doc(path);
    update = await ref.update(data).then((_) {
      return true;
    }).catchError((Object ex) {
      setError(ex);
      return false;
    });
  } catch (ex) {
    setError(ex);
    update = false;
  }
  return update;
}