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

AdvStory with Provider #24

Open
pabloposada09 opened this issue Oct 6, 2022 · 3 comments
Open

AdvStory with Provider #24

pabloposada09 opened this issue Oct 6, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@pabloposada09
Copy link

This plugin is really awesome, but it only has a little problem when you try to make the stories dynamics with Provider plugin, because when you want to watch the changes of the stories array with provider the AdvStory plugin doesn't redraw and when you click on a story it throw the following error, because it didn't update the list in the widget. ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ The following RangeError was thrown building: RangeError (index): Invalid value: Only valid value is 0: 7

Is there any way to make this plugin work listening to a provider variable ?

@emiliodallatorre
Copy link

Same problem here.

@pabloposada09
Copy link
Author

@emiliodallatorre I forgot to put here a provisional solution that I found. if I remember correctly I could solve this updating the data with provider but then using setState((){}); to make the page reload and with that you have the stories updated successfully. It is not the best solution, but could help. Hope it helps you too

@emiliodallatorre
Copy link

@emiliodallatorre I forgot to put here a provisional solution that I found. if I remember correctly I could solve this updating the data with provider but then using setState((){}); to make the page reload and with that you have the stories updated successfully. It is not the best solution, but could help. Hope it helps you too

Thanks!
I'd be very thankful if you could give me more infos. I suspect that keeping the controller referenced may prevent the update even with a setState.

@ertgrulll ertgrulll added the bug Something isn't working label Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants