How do I make a subcollection of user data in Firebase?

I'm creating an Hospital App in flutter. My goal is to configure firebase in such a way that the root collection is named User/uid(uid which is automatically generated...

QuerySnapshot docs.length just return 0

I was trying to make a clone of instagram, and I got to the part that I want to display the number of comments of the post using QuerySnapshot. My code is as follow:</...

Issue adding element to list

I'm a total newbie to Flutter and I'm trying to add some data from Cloud Firestore to a list in Flutter, but having issues. I try to add the element, but after executi...

Flutter: Firestore component is not present

I have a problem with Firestore database under Flutter. I have done everything, what the package setup documentation says, looked into 2-3 finished public application,...

Firestore transaction fails with Transaction failed all retries

I'm running a very simple Firestore transaction which checks for the presence of a document, before writing to it if absent. (The use case is registering a use...

Flutter Firestore - PERMISSION_DENIED: Missing or insufficient permissions

I have the following simple rules set up in my firestore database. <pre><code>service cloud.firestore { match /databases/{database}/documents { function isS...

How to convert DocumentSnapshot to Map&lt;String, dynamic&gt;?

<strong>I have a <code>DocumentSnapshot</code> parameter, and I want to convert it to <code>Map</code></strong>. How do I achieve that? Note: In my case...

Get information from Firebase and able to use it with a Gridtile and GestureDetector in Flutter

So I'm trying to design a Widget which can basically create a view where you can have something like this: <a href="https://i.stack.imgur.com/GHtKE.png" rel="no...

How do I get my document fields into a model field from Firestore

I have a list of documents from Firestore (postItemz). I wish to pass these into a model (Post) built to hold the data <pre><code>class PostViewModel { List&lt;...

How to use constructor objects in another state using flutter

I am creating this shopping app , the home page displays pictures and some data from firestore firebase as a gridView. <a href="https://i.stack.imgur.com/hJfyN.jpg" re...

How to save a field as null to Firebase if no value is entered in TextFormField

'?? null' works if only the first field has it, however it won't save if the other field(s) also has '?? null'. Is there a better way to write this? <pre><code>onP...

Firestore: remove document and collections and same time

I have a portfolio collection in Firestore. Each portfolio has rents and I can remove any of this. Removing the rent just removes that, the rent itself but when I remo...

How can i make search by similar image from data stored in firebase using flutter?

<a href="https://i.stack.imgur.com/Lh1ij.png" rel="nofollow noreferrer">firestore</a> How can i make search by similar image from data stored in firebase using...

for loop inside the firebase listen is not updating

In my application i want call data from firebase different collections. First I want to list all items and take the id. Using that id i want to retrieve price from pri...

Flutter Firestore How to load array from firestore to a list

I want to load the array from Firestore into a list in Flutter. I tried to use List.castFrom to convert Firestore array into List, but it does not work. <pre><code...