Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Showing another widget(example: a text) when we run out of cards #63

Open
sinaziaee opened this issue Feb 3, 2021 · 1 comment
Open

Comments

@sinaziaee
Copy link

I want to show a text widget that says "no cards remaining" when I swipe all of the cards. Does anybody know how this is possible?

@timow512
Copy link

timow512 commented Jun 7, 2021

I solved this by placing the widget in a Stack, so its laying behind the tinderStack. When the stack is empty, the other widget will be shown.

Here an example:

SizedBox(
                    child: Stack(
                      children: [
                       RefreshButton(
                                topMsg: "No more found",
                                bottomMsg: "Load again",
                                onPress: () {
                                  _doSomeThing();
                                },
                              ),
                        TinderStack(
                          items: items,
                          cardController: cardController,
                        ),
                      ],
                    ),
                  );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants