Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

dart init map

var m2 = <String, Map<int, List<String>>>{}; // empty map
m2['otherKey'] = <int, List<String>>{}; // add an empty map at the top level
m2['otherKey'][2] = <String>[]; // and an empty list to that map
m2['otherKey'][2].add('baz'); // and a value to that list
print(m2);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dart #init #map
ADD COMMENT
Topic
Name
6+2 =