Skip to content

Instantly share code, notes, and snippets.

@jebright
Created September 23, 2018 16:02
Show Gist options
  • Save jebright/ece162125aec35bd1627687393648168 to your computer and use it in GitHub Desktop.
Save jebright/ece162125aec35bd1627687393648168 to your computer and use it in GitHub Desktop.
Dart Fundamentals - Lists - Filtering
void main() {
List<double> prices = [0.25, 1.00, 3.33, 0.75, 4.25, 5.99];
var overOneDollar = prices.where((p) => p > 1.00);
log(overOneDollar); //prints 3.33, 4.25, 5.99
}
void log(var lst) {
lst.forEach((n) => print(n));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment