问题:给ListView列表添加滚动条的时候会报错
[Another exception was thrown: The PrimaryScrollController is currently attached to more than one ScrollPosition.]

页面滚动的 ScrollController 里面有Scrollbar/ SmartRefresher/ ListView.builder
这里报错意思是 ScrollController 控制了多个组件里面的滚动

解决方法:
给滚动组件都建一个controller,因为我用到了滚动组件pull_to_refresh,处理如下

Scrollbar(controller: controller,    // 这里child: SmartRefresher(enablePullDown: true,enablePullUp: true,header: RefreshConfig.refreshHeader(),footer: RefreshConfig.refreshFooter(),controller: _refreshController,onRefresh: _onRefresh,onLoading: _onLoading,child: ListView.builder(controller: controller,   // 这里shrinkWrap: true,addAutomaticKeepAlives: true,physics: const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics(),),itemBuilder: (BuildContext context, int index) {return buidListItem(_listModel.list[index], _listModel, index);},itemCount: _listModel.list.length,),
);

Another exception was thrown: The PrimaryScrollController is currently attached to more than one Scr相关推荐

  1. MyEclipse Servers视窗出现“Could not create the view: An unexpected exception was thrown”错误解决办法...

    MyEclipse 打开后有时候莫名的在server窗口里抛出"Could not create the view: An unexpected exception was thrown&q ...

  2. Could not create the view: An unexpected exception was thrown.

    Myeclipse非正常关闭后再次打开,"Servers"非正常显示,出现如下错误:Could not create the view: An unexpected excepti ...

  3. 【registry】registry An exception was thrown while processing request with message

    1.背景 registry创建依赖关系的schema时候如下:[hortonworks/registry]registry 如何创建 互相依赖的 schema ,然后报错如下 {"respo ...

  4. Connection id “0HMGNTPDIIA4M“.Request id “0HMGNTPDIIA4M:00000001“:An unhandled exception was thrown

    在生产环境的日志中经常看到一个error信息,具体内容如下,虽然不影响系统的使用,但是大量的出现,还是决定要解决掉它. Connection id "0HMGNTPDIIA4M". ...

  5. Another exception was thrown: There are multiple heroes that share the same tag w

    报错: I/flutter (18994): Another exception was thrown: There are multiple heroes that share the same t ...

  6. MyEclipse10 Servers窗口出现“Could not create the view: An unexpected exception was thrown”解决办法

    今天打开MyEclipse10,Servers突然出现"Could not create the view: An unexpected exception was thrown" ...

  7. Could not create the view: An unexpected exception was thrown. 电脑突然断电,myeclipse非正常关闭,出现错误...

    电脑突然断电,myeclipse非正常关闭,"Package Explorer"非正常显示,出现错误"Could not create the view: An unex ...

  8. An exception was thrown while activating Castle.Proxies.AppService测试AProxy -> Castle.Proxies.AppServ

    今天在是用abp vnext的自动控制器是碰见了个比较坑的地方 报错如下 意思是.net abp 框架依赖注入不能2个service 互相引用 我的"Appservice测试A"里 ...

  9. Could not create the view: An unexpected exception was thrown. Myeclipse空间报错

    转载于:https://blog.51cto.com/82654993/1424339

  10. 【转载】Could not create the view: An unexpected exception was thrown.问题解决

    今天打开Myeclipse10的时候,发现server窗口出现一堆问题,问题如标题,然后下方出现了一堆java.lang.NullPointerException的问题. java.lang.Null ...

最新文章

  1. 顶象iOS安全编译器(iOS安全加固神器) ——内测活动开始啦!
  2. python绘制灰度图片直方图-python数字图像处理实现直方图与均衡化
  3. Java代码的基本格式及注释
  4. IMAP和POP3的相关知识与区别
  5. 一个 .Net Hashtable 的锁的疑惑和解决
  6. mysql 5.7版本目录无data文件夹的解决办法
  7. 棍子节快乐~ 顺便转一篇weka源码分析解析~【转自weka中文网】
  8. 创建索引的方法有两种
  9. 远程过程调用(RPC)
  10. 非计算机专业《Python程序设计基础》教学参考大纲
  11. java client和servers_“java -server”和“java -client”之间的真正区别?
  12. 干货|详解最新语音识别框架 深度全序列卷积神经网络
  13. C++ 变量、常量、符号常量
  14. shopex服务器信息,最新版ShopEx 安装和默认后台地址及修改方法
  15. APDU应用协议数据单元
  16. 谷歌浏览器将网页保存为图片或者pdf
  17. 如果出现 Cause: java.lang.ClassNotFoundException: Cannot find class: com.itheima.domian.User
  18. 女超人、女强人……究竟是谁在以“女”设限?
  19. 操作系统学习——分时操作系统
  20. BAISS的动态分布式搜索存储协议(DDSSP)究竟是什么?

热门文章

  1. 从实习到毕业从事前端工作这两年
  2. 吴恩达深度学习02-3.567 Batch Normalization(BN)
  3. 【OpenCV学习笔记】之离散傅里叶变换(DFT)
  4. 你真的打算凑合过完这一生吗(转)
  5. 手把手教你搭建SpringCloud项目(十)集成OpenFeign服务接口调用
  6. 2015年工作总结——①名IT女的日常
  7. 英语学习第5篇_并列句
  8. 使用ArrayList集合,对其添加10个不同的元素,并使用Iterator遍历该集合
  9. 我的 OCM 之路|书写无悔青春,追梦永不止步
  10. 数据库与开源编译器框架LLVM