toListMap static method
Converts a list of ModelLess instances to a list of maps.
Each ModelLess instance in the input list is converted to a map using the
toMap method, and the resulting maps are collected into a new list.
list The list of ModelLess instances to be converted.
Returns a list of maps, where each map corresponds to a ModelLess instance.
Implementation
static List<Map<String, dynamic>> toListMap(List<ModelLess> list) {
List<Map<String, dynamic>> res = [];
for (var l in list) {
res.add(l.toMap());
}
return res;
}