Open xshiwei opened 9 months ago
自带就有,infiniteOffset不为null即可。但是Web不支持
Web理论上也应该可以吧,鼠标滚轮滚动的时候,检测list到底部的时候自动加载更多
Web理论上也应该可以吧,鼠标滚轮滚动的时候,检测list到底部的时候自动加载更多
不支持,在Flutter中,滚轮不能越界
_controller.addListener(() { if (_controller.position.atEdge) { bool isTop = _controller.position.pixels == 0; if (isTop) { debugPrint('At the top'); } else { debugPrint('At the bottom'); onLoadMore(); } } });
_controller.addListener(() { if (_controller.position.atEdge) { bool isTop = _controller.position.pixels == 0; if (isTop) { debugPrint('At the top'); } else { debugPrint('At the bottom'); onLoadMore(); } } });
这个方式可以吗,判断列表到底部了则自动加载更多
你可以试试设置Footer中的infiniteOffset,这个是距离底部多少,触发加载。但是Web中使用滚轮始终不能显示Footer
infiniteOffset 这个偏移量在web上即使设置为0也无效,是因为web上在到底部了无法进行偏移操作对吧。 我的想法是在无限滚动的逻辑那里,针对web进行特殊的处理,只判断position是否到底部。
不知是否可行
不知是否可行
设置infiniteOffset为正数,你可以试试看
不行,设置了10,但是到底部后无法再触发滚动了。
我和flutter官方提过这个issue的,不过他们似乎不认为这个是一个待解决的问题
我和flutter官方提过这个issue的,不过他们似乎不认为这个是一个待解决的问题
是的,所以受限Flutter官方的做法。目前还没找到其他解决办法
_controller.addListener(() { if (_controller.position.atEdge) { bool isTop = _controller.position.pixels == 0; if (isTop) { debugPrint('At the top'); } else { debugPrint('At the bottom'); onLoadMore(); } } });
这个代码我在web测试过了,是可以到底部位置自动加载更多的。 不知道在咱们这个项目里能否作为web端的暂时的处理方式。毕竟鼠标下拉才加载更多在web上体验太不友好了。
可能两者思想不兼容,footer改动会很大,那还是不太方便。
Web理论上也应该可以吧,鼠标滚轮滚动的时候,检测list到底部的时候自动加载更多
不支持,在Flutter中,滚轮不能越界
flutter_easy_refresh 2.x版本,在windows端,滚轮使得列表滚到底部,会触发加载下一页。easy_refresh 3.3.4 在windows端,滚轮滚动到列表底部,也触发不了加载下一页。
flutter_easy_refresh 2.x版本,在windows端,滚轮使得列表滚到底部,会触发加载下一页。easy_refresh 3.3.4 在windows端,滚轮滚动到列表底部,也触发不了加载下一页。
@xuelongqy easy_refresh 3.x 怎么才能做到 2.x那样,滚动到底部触发加载下一页?
我想实现用户滑动到底部自动加载更多,在web上也是如此。当滚动到list最大距离时自动加载更多,项目有属性能实现这个效果吗