Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

dart map list to map

You can use Map.fromIterable:
var result = Map.fromIterable(l, key: (v) => v[0], value: (v) => v[1]);

or collection-for (starting from Dart 2.3):
var result = { for (var v in l) v[0]: v[1] };
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dart #map #list #map
ADD COMMENT
Topic
Name
2+5 =