I develop an application that remind elderly about their medication time, and know I want to enable them to updater their medication and store any changes they have. that's my code to update medication name:
onPreesed: () async {
final updatedMedcName1 = await FirebaseFirestore.instance
.collection('medicine')
.doc(**????????**)
.update({'medicationName': updatedMedcName});
// Navigator.of(context).pop();
},
but I don't know how can I get the doc id, which is below:(underlined in red)

for field medId
I got the id using code:
FirebaseFirestore.instance.collection('medicine').doc().id,
but it's not the same like id underlined in red