I've got a MappedListIterable than I know to sort
When calling the sort method , I 'm getting
EXCEPTION: NoSuchMethodError: Class 'MappedListIterable' has no instance method 'sort'. Receiver: Instance of 'MappedListIterable' Tried calling: sort(Closure: (dynamic, dynamic) => dynamic)
You get a
MappedListIterableafter calling .map(f) on anIterable.The Iterable class does not have a
sort()method. This method is on List.So you first need to get a
Listfrom yourMappedListIterableby calling.toList()for example.Or in one line (code-golf):