grouped_list
grouped_list copied to clipboard
How to group a list from sqlite db?
I saw the documentation but I can't get any idea about how to group a list which is from sqlite database.
List<Note2> items2 = new List();
DatabaseHelper db = new DatabaseHelper();
db2.getAllNotes2().then((notes2) {
setState(() {
notes2.forEach((note2) {
items2.add(Note2.fromMap(note2));
});
});
});
}
ListView( //currently using listview but I want grouped listview
shrinkWrap: true,
itemCount: items2.length,
itemBuilder: (BuildContext context, int position) {
.....
items2[position].dates //grp according to date
......
How to use the plugin in this case
I have same issue I dont know ow to turn my db result to "elements: _elements," type of list...