grouped_list icon indicating copy to clipboard operation
grouped_list copied to clipboard

How to group a list from sqlite db?

Open jagadish-pattanaik opened this issue 4 years ago • 1 comments

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

jagadish-pattanaik avatar Dec 23 '20 06:12 jagadish-pattanaik

I have same issue I dont know ow to turn my db result to "elements: _elements," type of list...

KlubAndroid avatar Jun 22 '21 16:06 KlubAndroid