Flutter - Group date wise and show under a sticky header

六月ゝ 毕业季﹏ 提交于 2020-12-15 05:22:07

问题


I want to group all list tiles according dates which are same and show them under sticky bar as shown in the picture. I get the dates from sqlite database.

The data from the database is in format like this: 21-01-2020.

It should show Today, tomorrow and date for example 28 Nov 2020 as in the picture.

ListView.builder(
...
  return listTile(
    title: Text(items[position0].dates), //dates from database, returns 21-01-2020
  ),
),

At last I just want results like the below picture by comparing dates from database...The sticky header should be dynamic and change according to database as which one showing today may be yesterday tomorrow.

I want it to be like this

来源:https://stackoverflow.com/questions/64905471/flutter-group-date-wise-and-show-under-a-sticky-header

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!