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

Allow currentPage (int) parameter instead of currentPageNotifier (ValueNotifier) #8

Open
ultimate-tester opened this issue Oct 22, 2024 · 0 comments

Comments

@ultimate-tester
Copy link

Greetings!

In my project, I rely on Bloc for State Management. I'd like to keep the current page index inside my bloc state, and can then rebuild my widgets if needed using Blocbuilder. Using a ValueNotifier to set the current page index introduces a bit of overhead, because I have the integer available in my state. I could simply set an integer for the currentPage and there's no need for a ValueNotifier anymore. This same principle applies to any state management library.

For this use case, I suggest to add a parameter called currentPage next to currentPageNotifier. Users can then choose to either input an integer, or input a ValueNotifier.

If you like this idea, I can write this up and create a PR in a short timespan. Let me know what you think.

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

1 participant