关于hi_banner使用的问题
来源:6-4 轮播图Banner组件封装

qq_夜雨肖潇_0
2023-07-13
在首页的时候直接使用HiBanner(bannerList),把原有代码先注释掉,如图,运行后报======== Exception caught by widgets library =======================================================
The following assertion was thrown building NotificationListener:
ScrollController not attached to any scroll views.
‘package:flutter/src/widgets/scroll_controller.dart’:
Failed assertion: line 105 pos 12: ‘_positions.isNotEmpty’,当我点击底部导航再次切换回到首页就正常了,请问老师这个是什么原因呢?
写回答
1回答
-
应该是第一次bannerList为空导致的。012023-07-14
相似问题