Grouping ListView Items by Date

Resolved

Hoping you can assist me. I'm fairly new to FF.

Context
I am creating a food tracking app that works offline, so I'm using an app state list called 'feedingLogs' to store the user's logged meals (meal name, DateTime). I display this using a listview. Currently, the list shows each record from newest to oldest. For example:

11:30am 21/3/24 - Apple
12:10am 21/3/24 - Banana
11:30pm 20/3/24- Orange
10:00pm 20/3/24 - Banana

I want the list to be broken up by the days they were recorded, so instead of seeing a long list of feeds, there's text splitting the different days so you can easily see the difference between days. For example, the list would look like this:

Today
11:30am 21/3/24 - Apple
12:10am 21/3/24 - Banana

Yesterday
11:30pm 20/3/24- Orange
10:00pm 20/3/24 - Banana

I noticed FF actually has a page template that is essentially what I want to achieve - screenshot below. Hoping you can assist me with this, really appreciate your time!

1
6 replies