That seems to be a single document. You would have to fetch the whole document if you are just going to have a new map for each date. Then sort it yourself using dart.
FirebaseFirestore.instance
.collection('BMI')
.doc('docID')
.get()
.then((DocumentSnapshot documentSnapshot) {
if (documentSnapshot.exists) {
print('Document exists on the database');
// sort here
List myList = documentSnapshot.data!.data().entries.map((entry) => entry).toList();
print(myList);
// sorting the list
print(myList.sort((a, b) => a.date.compareTo(b.date)))
}
});
You can read more about sorting lists here. If you need to limit number of entries to be fetched then you would have create a dedicated documents for each entry.