小编tet*_*kil的帖子

如何通过使用 json API 在列表视图中创建网格视图

我想创建一个购物车应用

我有问题

如何使用 JSON API 在 ListView 中创建 GridView

我想要它完全像这个例子:

https://i.stack.imgur.com/2KQFG.png

https://i.stack.imgur.com/I0gY8.gif

- - 更新 - -

关于 SliverGrid

我试图获取产品但出现错误(这是关于 SliverGrid 部分)

I/flutter ( 5992): ??? EXCEPTION CAUGHT BY WIDGETS LIBRARY ????????????????????????????????????????????????????????????
I/flutter ( 5992): The following assertion was thrown building FutureBuilder<List<dynamic>>(dirty, state:
I/flutter ( 5992): _FutureBuilderState<List<dynamic>>#78747):
I/flutter ( 5992): A build function returned null.
I/flutter ( 5992): The offending widget is: FutureBuilder<List<dynamic>>
I/flutter ( 5992): Build functions must never return null. To return an empty space that causes the …
Run Code Online (Sandbox Code Playgroud)

api json dart flutter

3
推荐指数
1
解决办法
7552
查看次数

标签 统计

api ×1

dart ×1

flutter ×1

json ×1