Is it possible to dynamically show widgets depending on it's place in a list?

I have a list where I have a divider on each row, to make lines for each row.

I also have a container around my list to rounded corners. My problem is that the last item in the list should not show the divider as it makes the UI look a little clunky at the bottom.

I've played around with some conditional visibility, and trying to tease out the last item based on the index number of the list, but I don't seem to get anywhere.

Is there a way to dynamically hide the divider at at the bottom? Is this the right way to go about this?

1