Skip to content

Handle swipe in the logic #62

Description

@github-actions

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;
                },

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions