type ‘String‘ is not a subtype of type ‘int‘ of ‘index‘

刚入手 flutter,在解析数据时总是报错 type 'String' is not a subtype of type 'int' of 'index'  但是获取数据没有问题

只需要先将String类型数据json编码为Map数据 即可

 Map<String, dynamic> responseData =  jsonDecode(response.data);
 

猜你喜欢

转载自blog.csdn.net/qq_33209777/article/details/113743861