https://github.com/Erengun/pati-pati-app/blob/b41fb34ec88c31042d1c2d91f43f1aa98d6c4d6f/lib/ui/home/home.dart#L99
duration: const Duration(milliseconds: 300),
controller: controller,
onSwipe: (int oldIndex, int? newIndex,
CardSwiperDirection direction) async {
//TODO: Handle swipe in the logic
if (newIndex != null) {
ref
.read(swipeCardLogicProvider.notifier)
.setId(pawEntries[newIndex].id);
ref
.read(homeScreenLogicProvider.notifier)
.setFavorite(pawEntries[newIndex].id, direction == CardSwiperDirection.right);
}
return true;
},
https://github.com/Erengun/pati-pati-app/blob/b41fb34ec88c31042d1c2d91f43f1aa98d6c4d6f/lib/ui/home/home.dart#L99