You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: