Map<String, dynamic> listToMap(List list) { Map<String, dynamic> map = {}; for (var i = 0; i < list.length; i++) { map[list[i].toString()] = list[i]; } return map; }