Filter a list

suggest change

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.

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents