Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save saidihasan/b96c85cb0b624b3b58af2823e1cd05d4 to your computer and use it in GitHub Desktop.
Save saidihasan/b96c85cb0b624b3b58af2823e1cd05d4 to your computer and use it in GitHub Desktop.
DartListAndMap
// Copyright 2015 the Dart project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file.
void main() {
var kidsBooks = [{'Matilda': 'Roald Dahl',
'Green Eggs and Ham': 'Dr Seuss',
'Where the Wild Things Are': 'Maurice Sendak'}];
Map booksMap = new Map();
for(var i = 0; i < kidsBooks.length; i++){
booksMap = kidsBooks.elementAt(i);
}
print(booksMap);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment