update function

Future update(
  1. dynamic data,
  2. dynamic table,
  3. dynamic cond
)

Implementation

Future update(data, table, cond) async {
  var tempString = FirebaseFirestore.instance.collection(table);
  tempString.doc(cond).set(data).then((value) {
    var tempData = cond;
    return tempData;
  }).catchError((error) => debugPrint("Failed to update user: $error"));
}