Guest User

Untitled

a guest
Jan 23rd, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. void main() {
  2. Map firstMap = { "id": 1, "value": [{"key": "A"}, {"key": "B"}]};
  3.  
  4. List valueList = firstMap["value"];
  5.  
  6. List<Map> newList = valueList.map((valueItem) => {
  7. "id": firstMap["id"],
  8. "value": [valueItem]
  9. }).toList();
  10.  
  11. print(newList);
  12. }
Add Comment
Please, Sign In to add comment