Flutter-AzListView

1 · kahvia · March 14, 2023, 8:45 a.m.
修复数据过少时跳转反弹修改源码中滚动代码如下所示。1234567891011121314151617181920212223242526272829void _scrollTopIndex(String tag) { int index = _getIndex(tag); int itemsCountOnScreen = itemPositionsListener.itemPositions.value.length; if (index != -1) { //如果要跳转的条目后面的数据个数<屏幕可容纳的数据个数,使用align属性去调整跳转 //条目在屏幕上的位置。align默认是0,即条目的头部top与可视部分上边缘对齐。 //计算正确的对齐位置,才能让它正常显示。 //if the the items'counts after the item you want to jump less than //full screen items counts, use the align to justify the item's location ...