A Flutter widget for Tinder like swipe cards. The card can be swiped right, left and up for different responses. Currently it supports the following responses:
Right swipe for like
Left swipe for nope
Up swipe for superlike
Install
To install the package, add the following dependency to your pubspec.yaml
An instance of MatchEngine that acts as controller for trigerring swipes manually.
itemBuilder
A function that returns the view inside a swipe card.
likeTag
Widget appears in like/right area during swipe.
nopeTag
Widget appears in nope/left area during swipe.
superLikeTag
Widget appears in super-like/up area during swipe.
onStackFinished
A function that is triggered as soon as all the cards have been swiped.
itemChanged
A function that is triggered when item in the stack changes (moves to next card).
leftSwipeAllowed
To enable/disable left swipe. (Default: true)
rightSwipeAllowed
To enable/disable right swipe. (Default: true)
upSwipeAllowed
To enable/disable up swipe. (Default: false)
fillSpace
Config weather to fill up the space or not. (Default: true)
MatchEngine
MatchEngine is the controller for the swipe cards. It takes swipeItems as an argument and is
used to trigger the swipes manually, for example on button press. The data type of swipeItems
is List<SwipeItem>.
SwipeItem contains the actual data that can be rendered in the swipe card. Actually it is a
wrapper over any dynamic object and just adds the functionality of like, nope and superlike to that
object.