londonappbrewery / Flash-Chat-Flutter-Complete

The completed code for the Flash Chat Project - The Complete Flutter Development Bootcamp
https://www.appbrewery.co/
92 stars 133 forks source link

order by created timestamp #9

Open jr00n opened 4 years ago

jr00n commented 4 years ago

Proper ordering by created timestamp

simplygkgk commented 4 years ago

Still not able to get the order Please explain. As suggested by you when i create a 'created' time stamp , i cant see any messages. please share ASAP

deepakmkoshy commented 3 years ago

The descending should be false right? .orderBy('created', descending: false)

instead of

.orderBy('created', descending: true)

legolegoles commented 3 years ago

Yes. Ascending order is also fine and looks more natural. You can omit the descending parameter altogether.

.orderBy(‘created’)