Tinder/TanTan Card Widget.
-
Depend on it by adding this to your pubspec.yaml file:
scrumlab_flutter_tindercard: ^x.x.x
-
Import it:
import 'package:scrumlab_flutter_tindercard.dart'
-
Add TinderSwapCard in your widget layout and write the single card layout builder you need, then you get a Tinder(探探) like swap card widget!
-
Use
CardSwipeCompleteCallback
for the swiped orientation and index! -
Use
CardController
to trigger swap from outside. Init a CardController as param for widget, and invoke methodtriggerLeft/Right
of yourCardController
to trigger swipe! -
Use
CardDragUpdateCallback
to get swiping card's detail.