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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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