inview_notifier_list icon indicating copy to clipboard operation
inview_notifier_list copied to clipboard

How to use EasyRefresh

Open zhongcg opened this issue 5 years ago • 7 comments

zhongcg avatar Jun 19 '20 08:06 zhongcg

@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: <Widget>[ 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, ), ) ]);

zhongcg avatar Jun 19 '20 09:06 zhongcg

can not change isInView Index . isInView index still 0

zhongcg avatar Jun 19 '20 09:06 zhongcg

I could not understand your question completely. Can you elaborate?

rvamsikrishna avatar Jul 01 '20 09:07 rvamsikrishna

Hi, I can confirm that EasyRefresh is working if you enable in InViewNotifierList shrinkWrap: true, physics: ScrollPhysics(),

but the isInView does not change

sdegenaar avatar Jun 14 '21 05:06 sdegenaar

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

zhujiahong avatar Jun 30 '21 03:06 zhujiahong

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

sdegenaar75 avatar Jul 06 '21 02:07 sdegenaar75

Hi, any news on this or suggestions? Thanks!

sdegenaar75 avatar Aug 11 '21 03:08 sdegenaar75