Click here to Skip to main content
15,904,638 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have been able to query a data in a subcollecion directly using collectiongroup with the following code in flutter:

What I have tried:

final uid = FirebaseAuth.instance.currentUser!.uid;
QueryDocumentSnapshot<map<string, dynamic="">>? selectedRide;

StreamBuilder(
stream: FirebaseFirestore.instance
.collectionGroup('Requests')
.snapshots(),
builder: (BuildContext context,
AsyncSnapshot<querysnapshot<map<string, dynamic="">>> snapshot)
{ final request = snapshot.data!;

return ListView.builder(
itemCount: snapshot.data!.docs.length,
itemBuilder: (context, index) return Card(
onTap: () {} ////update data onTap of this list view.
//Let's say the data is : request.docs[index].get('Full Name')
How do I update it?
)})
)
Posted
Comments
wseng 28-Mar-23 23:56pm    
what you want to update?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900