Flutter 数组转Key value

2020-12-07 15:42:55 浏览数 (1)

数组对象转Key Value 方便查找

代码语言:javascript复制
Map<String,Object> map = Map.fromIterable(list,key: (it) =>it.id,value: (it) =>it);

0 人点赞