i have many document inside a collection of firebase. But i want to retrieve only the last document which is present at the bottom. You can see the image . i want to retrieve the highlighted document
Asked
Active
Viewed 2,904 times
1 Answers
4
You can use last in following way to get last document.
Firestore.instance.collection("data").snapshots().last
This will give you only last element.

Viren V Varasadiya
- 25,492
- 9
- 45
- 61
-
I want last 7 uploaded documents how can I perform that – Apr 27 '21 at 18:49