Reputation: 740
Map<String, bool> _toDos = {
'case1': true,
'case2': false,
'case3': false,
'case4': false,
'case5' : false
};
Say I have a map object like this and I want to get the length of strings that contains "true" values. How do I do so with flutter?
_toDos.length
gives me the length of the map but I want to get the length of items that contain only "true" values.
Upvotes: 1
Views: 1664