请求接口获得数据进行赋值时,提示数据类型不匹配:

type 'List<dynamic>' is not a subtype of type 'Map<String, dynamic>'

检查报错代码段以及后端返回来的数据类型,

bankCardInfo = data;  //错误代码

解决办法:data是后端返回来的数据,发现该数据类型是数组,使用data中的第一个元素进行赋值。

 bankCardInfo = data[0];

总结:在进行请求数据时需要特别注意数据的类型以及参数,类型以及参数不匹配都会产生错误。

Flutter type ‘List<dynamic>‘ is not a subtype of type ‘Map<String, dynamic>‘相关推荐

  1. TypeError: super(type, obj): obj must be an instance or subtype of type这个问题怎么处理?

    TypeError: super(type, obj): obj must be an instance or subtype of type这个问题怎么处理? 这个错误通常发生在使用super()函 ...

  2. Python提示 TypeError: super(type, obj): obj must be an instance or subtype of type问题

    Python提示 TypeError: super(type, obj): obj must be an instance or subtype of type问题 简述问题 在工作中有一天将debu ...

  3. TypeError: super(type, obj): obj must be an instance or subtype of type

    问题 今天学习<Python Web 开发实战>自定义转换器这一小节,书中有段代码如下: class ListConverter(BaseConverter):def __init__(s ...

  4. TypeError: super(type, obj): obj must be an instance or subtype of type 该错误的一次处理

    我在写maya类的时候遇到,版本python2.7 folder lib mayaclass.py base类 A(base)类 ui.py 其中A继承base ui.py文件中内容 #python2 ...

  5. I/flutter ( 7317): type ‘_Map<String, dynamic>‘ is not a subtype of type ‘Folder‘

    记录一个bug,再记录一下自己的新"发现". 在flutter里面将后端获取的数据转换成本地模型的时候,在模型里面使用了其他模型类型(比如外键这种) 数据结构如下(JSON): { ...

  6. type ‘_Map<String, dynamic>‘ is not a subtype of type ‘Map<String, Object>‘

    type '_Map<String, dynamic>' is not a subtype of type 'Map<String, Object>' 使用Map<Str ...

  7. Flutter type ‘Future<bool>‘ is not a subtype of type ‘bool‘ in type cast

    这个问题是我在使用flutter shared_preferences的时候,自己默认写了几个存储和读取的字段函数,然后出错了 问题在! 我使用的时候非常耿直 如图 getUserNameInput函 ...

  8. 成功解决TypeError: super(type, obj): obj must be an instance or subtype of type

    super(Graphnet, self).init()改为 super().init()

  9. Python报错 TypeError: super(type, obj): obj must be an instance or subtype of type

    今天在Spyder里用BeautifulSoup的时候跑代码报这个TypeError. 遇到这个问题之后在网上搜了一下也不知道怎么解决,结果在Spyder里重启Ipython内核之后,就没有报错能顺利 ...

  10. Type safety: The method add(Object) belongs to the raw type List. References to generic type List<E>

    1 java 报错如下 Type safety: The method add(Object) belongs to the raw type List. References to generic ...

最新文章

  1. 程序是什么--过滤器和状态机
  2. 微软或允许 Android 应用运行于 Windows 和 WP
  3. 某小公司 RESTful、共用接口、前后端分离、接口约定的实践
  4. 谷歌Fuchsia OS负责人离职,网友:被鸿蒙挖走了?
  5. 一封电子邮件的发送和接收的主要步骤
  6. 40. Combination Sum II 组合总和 II
  7. 【学习笔记】整体二分
  8. 神经网络基本原理简明教程之非线性回归
  9. html5翻牌小游戏源码,html5记忆翻牌游戏实现思路及代码
  10. 网站被ddos攻击了怎么办?网站正在被ddos攻击怎么解决
  11. 达梦DM单机部署以及日常运维管理
  12. Web前端性能优化——如何提高页面加载速度
  13. 字母易位词(anagram)
  14. (八)高德地图之添加marker标记点
  15. 菜鸟仓库-货物格子问题编程题
  16. Python-各种Loss总结
  17. 黑马——C语言的一些基础(2)
  18. Chrome和Firebox快捷键
  19. Python定时获取外网IP地址并发送邮件
  20. Python爬取手机APP

热门文章

  1. 【正点原子STM32连载】第五十二章 FPU测试(Julia分形)实验摘自【正点原子】MiniPro STM32H750 开发指南_V1.1
  2. 安装的Mac Windows双系统,Mac分区的空间太小/太大了,有什么办法调整吗?
  3. html5搜狗浏览器缓存文件夹,搜狗浏览器中怎么查找之前看过的视频文件?
  4. Markdown - Markdown 引用图片太大怎么办 md控制图片的大小 对齐方式
  5. 【服务器数据恢复】服务器raid5磁盘阵列分区丢失的数据恢复案例
  6. 《多多自走棋》、《全民超神》均停服:盘点那些凉得最快的游戏
  7. SAP《MM学习指南》操作记录----仓库盘点
  8. 阿拉伯数字金钱转中文大写
  9. 《CSS 揭秘》每章详细读书笔记
  10. 微信小程序canvas2D全新API介绍