Daniel-Ioannou / flutter_group_list_view

A Flutter ListView in which items can be grouped into sections.
https://pub.dev/packages/group_list_view
MIT License
78 stars 17 forks source link

How to get Map<String, List<String>> _elements from rawQuery db #15

Open KlubAndroid opened 3 years ago

KlubAndroid commented 3 years ago

Hi my Sqlite returning rawQuery witch is Future<List<Map<String, dynamic>>> ... hot to conver result to map of type in example. Map<String, List> _elements = { 'Team A': ['Klay Lewis', 'Ehsan Woodard', 'River Bains'], 'Team B': ['Toyah Downs', 'Tyla Kane'], 'Team C': ['Marcus Romero', 'Farrah Parkes', 'Fay Lawson', 'Asif Mckay'], 'Team D': [ 'Casey Zuniga', 'Ayisha Burn', 'Josie Hayden', 'Kenan Walls', 'Mario Powers' ], 'Team Q': ['Toyah Downs', 'Tyla Kane', 'Toyah Downs'], };

Daniel-Ioannou commented 3 years ago

@KlubAndroid it depends, what is your groups and what is your row for each group? In the example the groups are the keys of the map and the value for each key is a list containing the items in this group.