Comments (8)
There's a pull request dated 16th Apr 2020 by dave-k. I pulled it and added separately in my code and it worked.
from flutter_tindercard.
There's a pull request dated 16th Apr 2020 by dave-k. I pulled it and added separately in my code and it worked.
Are you sure this is working? I put a dynamic number in totalNum and used a button to change it, but the number of cards remains the same.
from flutter_tindercard.
There's a pull request dated 16th Apr 2020 by dave-k. I pulled it and added separately in my code and it worked.
That example doesn't really make it async, it just inserts in the List instead of adding. You already need to have a list with a predetermined size.
If I'm going to fetch data from a database and then add it to the list, it doesn't work. Once you give the totalNum a certain int, it doesn't change anymore.
from flutter_tindercard.
What I did, and recommend you guys to do it too, is to make a FutureBuilder that can fetch all the data that you need and create the list (of widgets, string, or whatever it is) in a LoadingPage, then store that list in a file (like "userProfiles.dart") and then in the page that you want to use this package, in the totalNum, you can use the list.length, and in the cardBuilder the list[index].
from flutter_tindercard.
I changed the library code and put a setstate inside the didUpdateWidget method, and it works with a dynamically updating list.
from flutter_tindercard.
@singhayush1403 What exactly did you do? Can you please share the snippet?
from flutter_tindercard.
I think @vip20 is talking about this Pull Request. I used it, and yes I can re-add/load more cards by adding more items to my list.
However what I was unable to do with this package at all is to NOT to reset the index after loading the list. I don't want to display all the list again when I load it, because when user swipes a card (left or right), this means that that card is already used and I don't want to display it again.
I even tried to remove the swiped card from my list, however the card displayed to user won't be keep the same after loading new cards, it will move to another one (where the index pointer is). Yet you can't control the index.
It'd be a great help of anyone let us know how to do that.
from flutter_tindercard.
I was able to add to list and not to reset index after rebuild. Actually its resets but im removing items after I swipe them and send new stream to builder. #50 I created pr you can check that out.
from flutter_tindercard.
Related Issues (20)
- Get Top Card
- Increasing the height and width of the card makes the swipe left and right animation weird
- Whenever someone just clicks, not swipes on any card, it just pops to the next one without any callback. HOT 9
- Strange Glitch When Using Keys On SwipeStack()
- [Enhancement] - TinderCard OnTap HOT 1
- Any reason for multiple SwipeUpdateCallback HOT 1
- How to speed up the z axis animation of the new card?
- Showing another widget(example: a text) when we run out of cards HOT 1
- How to not show the Like or Nope image in all cards at same time?
- how to add card rewind effect like tinder?
- Is this package still maintained?
- Working with PageController - doesn't reset to initalpage
- Add Null safety HOT 4
- swipe up
- please add null safety
- How to add separation between each card?
- triggerUp() and triggerDown() don't work HOT 1
- How to reload all cards when rebuilding the widget?
- swipeCompleteCallback ็index ไธๅ็กฎ HOT 1
- The plugin `flutter_tindercard_plus` doesn't have a main class HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_tindercard.