dart Filter a list


Example

Dart allows to easily filter a list using where.

var fruits = ['apples', 'oranges', 'bananas'];
fruits.where((f) => f.startsWith('a')).toList(); //apples

Of course you can use some AND or OR operators in your where clause.