update method
Update the Firebase path with the provided Map object.
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;
}