appinioGmbH / flutter_packages

Dart and Flutter plugins/packages used and maintained by @appinioGmbH
193 stars 224 forks source link

Swiper: adding new cards programatically #77

Closed simplenotezy closed 1 year ago

simplenotezy commented 1 year ago

I guess a common use case would be to load in more cards to the back, based on some condition (e.g. when less than 3 cards left), but I am not sure if the library supports it, or how to go about it.

Any suggestions?

simplenotezy commented 1 year ago

I see now that the new version uses ItemBuilder which is pretty cool, so the count can simply be incremented (e.g. by appending to cards array)

khanmujeeb687 commented 1 year ago

Hi @simplenotezy , Yes you are right. With the new version, this feature will be available and you can increase the count on the go!

simplenotezy commented 1 year ago

Yes, I just saw that @khanmujeeb687 - super great additions. I was a bit confused first when I tried to align our own fork with current changes - but positively surprised to see this change! 😊

khanmujeeb687 commented 1 year ago

Yes, I just saw that @khanmujeeb687 - super great additions. I was a bit confused first when I tried to align our own fork with current changes - but positively surprised to see this change! 😊

Thank you so much for your appreciation @simplenotezy.

bilalhamud commented 1 year ago

Solved with version 2.0.0

mafzaldev commented 1 year ago

@bilalhamud Hi Bilal, is there any way to remove all the elements, at the _onEnd and add new elements on the go?