Quantcast
Channel: Active questions tagged listview - Stack Overflow
Viewing all articles
Browse latest Browse all 611

Get the length of List that exists in Map in Flutter

$
0
0

so i'm working on a Map that has this structure :

Map<String, List<Video>> mapName;

Where Video is just an object that has 3 attributes : String title,String videoURL, bool isDone.

I'm planing on creating a listView that will display all Video titles so i'm just trying to figure out how to get the length of the list that exists into the Map.

I tryed some test and it displayed this :

print(videoList.values.map((list) => list.length));    I/flutter (23887): (9)

Now its true that i have 9 videos in the list, but I cannot use this in my listview itemcount because it requires an int type data.


Viewing all articles
Browse latest Browse all 611

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>