I'm using flutter web in my graduation project and saving my data in the firebase so I'm displaying my data by the following code
StreamBuilder<QuerySnapshot> (
stream: FirebaseFirestore.instance.collection('Guests').snapshots(),
builder: (context, snapshots) {
return (snapshots.connectionState == ConnectionState.waiting)
? Center(
child: CircularProgressIndicator(),)
: ListView.builder(
itemCount: snapshots.data!.docs.length,
itemBuilder: (context, index){
var data = snapshots.data!.docs[index].data() as Map<String,dynamic>;
return ListTile(
title: Text(
data['Drug Name'],
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Colors.black54,
fontSize: 20,
fontWeight: FontWeight.bold),
),
subtitle: Text(
data['Drug Serial Number'],
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Colors.black54,
fontSize: 16,
fontWeight: FontWeight.bold),
),
);
and the output that the List of the items So i want when press on one of them the app takes me to another page which display the whole data of that item (its filed and sub-collection and their fields).
if anyone know how to do that I'll be thankful
I'm trying to find a piece of code which do what I'm asking for