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

来源:3-12 本章总结

云天化信息科技

2021-07-02

图片描述图片描述
json:
{
“access_token”: “ced96133-8ae3-487b-bcc7-74f4ad66348a”,
“token_type”: “bearer”,
“refresh_token”: “dbebbab5-9982-4574-9230-c9a00dde1d7f”,
“expires_in”: 18435,
“scope”: “server”,
“license”: “made by yth”,
“realName”: “超级管理员”,
“account_id”: “a1”,
“code”: 200,
“user_id”: “admin”,
“units”: [
“e9c6f7760be6426c6ecd4155db7cf773”
],
“unit_id”: “a1”,
“username”: “admin”,
“status”: “ok”
}

我在使用的时候遇到这个问题,是不是因为得到的数据只是个String呀

写回答

1回答

CrazyCodeBoy

2021-07-05

对的,按错误的提示行数修改下数据类型。

0
0

Flutter高级进阶实战-仿哔哩哔哩-掌握Flutter高阶技能

一次性掌握Flutter高阶技能+商业级复杂项目架构设计与开发方案

1722 学习 · 870 问题

查看课程