infinite_scroll_pagination icon indicating copy to clipboard operation
infinite_scroll_pagination copied to clipboard

[Feature Request] AnimatedList equivalent

Open sm2017 opened this issue 4 years ago • 14 comments

Is there any AnimatedList equivalent?

sm2017 avatar Nov 14 '20 07:11 sm2017

Hi @sm2017. First of all, I'm sorry for the delay. I was on a trip for the past few days and just got back today. The package doesn't have an AnimatedList equivalent right now. I'll definitely consider adding one in the future. Thank you for your suggestion!

EdsonBueno avatar Nov 21 '20 09:11 EdsonBueno

Hi @sm2017. First of all, I'm sorry for the delay. I was on a trip for the past few days and just got back today. The package doesn't have an AnimatedList equivalent right now. I'll definitely consider adding one in the future. Thank you for your suggestion!

Hey there any update of animated list equivalent? Thanks

sachin052 avatar Mar 01 '21 07:03 sachin052

Yea any update with being able to remove items from the list in an animated way?

brianschardt avatar Mar 02 '21 01:03 brianschardt

No updates. But let's reopen the issue in case anyone else has interest.

EdsonBueno avatar Mar 03 '21 09:03 EdsonBueno

@EdsonBueno I am very interested in this, do you know if there is a temporary way to achieve this behavior?

basketball-ico avatar May 13 '21 00:05 basketball-ico

Hi @basketball-ico Please, take a look at this. It might help

EdsonBueno avatar May 15 '21 17:05 EdsonBueno

Hi, I have not managed to use an animated list. If you have time, can you please make a small example, surely someone else will also find this useful. Thank you so much

basketball-ico avatar May 25 '21 11:05 basketball-ico

Would love to see this!

allenzhou101 avatar Jun 09 '21 02:06 allenzhou101

I had a play with this today and took @EdsonBueno advice I tried to implement the bare bones PagedSliverBuilder as per his link here I didn't manage to make it work and I think the problem is here

completedListingBuilder: ( context, itemBuilder, itemCount, noMoreItemsIndicatorBuilder, ) => SliverAnimatedList( initialItemCount: itemCount, itemBuilder: (context, index, animation,) { final finished = itemCount = index; return SlideTransition( position: animation.drive(offset), child: itemBuilder.call( context, index, ), ); }, ),

in the above example the variable finished points to the problem, I don't claim to be an expert so please correct me if I'm wrong, I think we can't return a single item here as we need the full list before we can start to animate it, and by the time its finished I will have a list of widgets not a single widget so this would need a new builder that accepted a list of widgets, happy to learn otherwise, here is my full widget

PagedSliverBuilder<int, InvoiceItem>( pagingController: _invoicesViewModel.getPagingController(), builderDelegate: PagedChildBuilderDelegate<InvoiceItem>( animateTransitions: false, itemBuilder: (context, invoiceItem, index) { return _invoiceItem( invoiceItem: invoiceItem, invoiceItemTileSelectState: null, ); }, firstPageErrorIndicatorBuilder: (context) => ew.ErrorWidget( showImage: true, error: _invoicesViewModel.getPagingController().error as ApiResponse, onTryAgain: () => _invoicesViewModel.getPagingController().refresh(), ), noItemsFoundIndicatorBuilder: _emptyListIndicator, newPageErrorIndicatorBuilder: (context) => _errorListItemWidget(onTryAgain: _invoicesViewModel.retryLastRequest), firstPageProgressIndicatorBuilder: (context) => const Center( child: LoadingWidget(), ), newPageProgressIndicatorBuilder: (context) => _loadingListItemWidget(), ), completedListingBuilder: ( context, itemBuilder, itemCount, noMoreItemsIndicatorBuilder, ) => SliverAnimatedList( initialItemCount: itemCount, itemBuilder: (context, index, animation,) { final finished = itemCount == index; return SlideTransition( position: animation.drive(offset), child: itemBuilder.call( context, index, ), ); }, ), loadingListingBuilder: ( context, itemBuilder, itemCount, progressIndicatorBuilder, ) => _loadingListItemWidget(), errorListingBuilder: ( context, itemBuilder, itemCount, errorIndicatorBuilder, ) => ew.ErrorWidget( showImage: true, error: _invoicesViewModel.getPagingController().error as ApiResponse, onTryAgain: () => _invoicesViewModel.getPagingController().refresh(), ), )

martipello avatar Nov 21 '21 16:11 martipello

Also interested

hermannpoilpre avatar Aug 10 '22 16:08 hermannpoilpre

Also interested on this. I am having a very bad time deleting items from the list

carrasc0 avatar Dec 10 '23 21:12 carrasc0

This would have been a great feature to have. Has any one had luck with using custom PagedListView?

AnwarTuha avatar Dec 30 '23 17:12 AnwarTuha