Closed pratamatama closed 3 years ago
Fixed by converting the boolean
as int
instead. My fault.
GroupedListView<Promo, int>(
elements: controller.promos,
groupBy: (Promo promo) => promo.expired ? 1 : -1,
...
itemComparator: (promo1, promo2) => promo1.expired == promo2.expired ? 1 : -1,
...
)
As the title said, I was expecting that the result should group the entity by the
expired
value which is a getter that returns aboolean
based on the calculation ofDateTime
of the given model. To be clear and simple, I want something like this:But I got this instead:
My implementation look like this:
And here is my Promo model, if needed:
Am I missed something?