Open zhongcg opened 4 years ago
can not change isInView Index . isInView index still 0
I could not understand your question completely. Can you elaborate?
Hi, I can confirm that EasyRefresh is working if you enable in InViewNotifierList shrinkWrap: true, physics: ScrollPhysics(),
but the isInView does not change
Hi, I can confirm that EasyRefresh is working if you enable in InViewNotifierList shrinkWrap: true, physics: ScrollPhysics(),
but the isInView does not change
I ran into the same problem ,when I add
shrinkWrap: true,
physics: ScrollPhysics(),
isInView can not working
yep be nice to get this working. I have tried lots of things. Let me know if you have any success or the author has any ideas. Thanks
Hi, any news on this or suggestions? Thanks!
@override Widget build(BuildContext context) { return NotificationListener( onNotification: (notification) { if (notification is ScrollEndNotification) { isTouch = false; setState(() {}); } if (notification is ScrollStartNotification) { isTouch = true; } return false; }, child: LoadStateLayout( state: _loadState, errorRetry: _onRefresh, emptyRetry: _onRefresh, successWidget: EasyRefresh( onRefresh: _onRefresh, onLoad: _loadMore, child: getListView(context)))); }
getListView(BuildContext context) { return InViewNotifierCustomScrollView( shrinkWrap: true, initialInViewIds: ['0'], isInViewPortCondition: (double deltaTop, double deltaBottom, double viewPortDimension) { return deltaTop < (0.5 viewPortDimension) && deltaBottom > (0.5 viewPortDimension); }, controller: _scrollController, slivers:[
SliverList(
delegate: SliverChildBuilderDelegate(
(context, index) {
GlobalKey bottomKey = GlobalKey();
return InViewNotifierWidget(
id: '$index',
builder: (BuildContext context, bool isInView, Widget child) {
final String inViewTxt = isInView ? 'inView' : 'notInView';
print('$inViewTxt $index');
return buildItems(
videolist[index], bottomKey, isInView);
},
);
},
childCount: videolist.length,
),
)
]);