Skip to content

Instantly share code, notes, and snippets.

@magnatronus
Created July 23, 2018 15:00
Show Gist options
  • Save magnatronus/8dac11163e40e29c907cdd63e3aafefe to your computer and use it in GitHub Desktop.
Save magnatronus/8dac11163e40e29c907cdd63e3aafefe to your computer and use it in GitHub Desktop.
Dart List example
void main() {
List myList = List();
myList.add({'title' :"Chocolate", 'isFavorite': true});
myList.add({'title' :"Cucumber", 'isFavorite': false});
myList.forEach( (item) {
print('${item['title']} ${(item['isFavorite'])?"is my favourite": "is not my favourite"}');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment