I have a StatefulWidget widget with a LinkedHashMap member done like this:
LinkedHashMap _items = new LinkedHashMap<String, List<dynamic>>();
Now I need to filter the items inside the List<dynamic>
items of the Map.
I use this code to filter:
function filter(_items) {
return _items.map((day, items) {
return new MapEntry(day, items.where((i) {
return i.stringProperty.contains(widget.filter);
}).toList());
});
}
But I get the error in the subject
type '(dynamic) => dynamic' is not a subtype of type '(dynamic) => bool' of 'test'
contains
, but a straight boolean test (a>0
). Perhaps some bug or regression somewhere. BTW thetest
is the callback passed towhere
, according to the language reference. – Chlores