随笔分类 - flutter使用过程中遇到的坑系列
摘要:需求 列表展示: 列表项都是同一格式,列表项数据从List里取 解决方案 使用map map源码 Iterable<T> map<T>(T f(E e)) => MappedIterable<E, T>(this, f); 调用map 返回的数据类型为Iterable 注意1: 需要将Iterabl
阅读全文
摘要:问题 Flexible 里用了 Column, 使得高度无法确定 解决方案 将Flexible替换为ConstrainedBox, 并设定maxHeight 代码 ConstrainedBox( constraints: BoxConstraints(maxHeight: 500,, child:
阅读全文
摘要:问题原因 json_annotation版本不对 修改json_annotation版本号 当前可用版本号 json_annotation: ^2.2.0
阅读全文
摘要:错误原因 json格式不正确,检查:是否加了注释、最后一个是否加了逗号... 正确格式 { "name": "shellon", "age": 25 }
阅读全文

浙公网安备 33010602011771号