Ny Regency
Ny Regency

Reputation: 1722

Cloud Firestore: Arrange documents

I have a flutter app that gets documents from Firestore and displays them in a card. Flutter gets the document as it is arranged in Firestore. Is it possible to change the ordering of documents in Firestore?

Upvotes: 0

Views: 57

Answers (1)

Ferdi
Ferdi

Reputation: 788

As far as I know there isn't one, and it's fine since firestore use unique Id to refere to each document. So It's exactly like a dictionnary, either you need a specific one then you should use his specific ID. Either you need many element and then you should use functions to filter and optionnaly sort the result you get but there is no need to re-arrange the way it's stored into firestore.

Hope it's help !!

Upvotes: 1

Related Questions