hello, i have cards and the name and surname of the person writes in it.when i click the button next to it, i want it to navigate to another page and in big card writes the whole information about that person saved in firebase(name,surname,medicine,illness etc).i did the navigate part, can you help me?
return Dismissible(
onDismissed: (_) {
data.docs[index].reference.delete();
},
key: UniqueKey(),
direction: DismissDirection.endToStart,
background: Container(
color: Colors.red,
child: Icon(
Icons.delete,
color: Colors.white,
),
alignment: Alignment.centerRight,
),
child: Card(
child: ListTile(
trailing: Wrap(
children: [
IconButton(
icon: Icon(Icons.edit),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
UpdatePatient()));
},
),
IconButton(
icon: Icon(Icons.search),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
ShowPatient()));
},
),
],
),
title:
Text("${data.docs[index]["name"]}"),
subtitle: Text(
"${data.docs[index]["surname"]}"),
),
