Help implement a use case - provider disposed too quickly #663
-
I have a problem implementing a use case and I would like to get some input. I have a list page I have another use case (which is giving me trouble) which is very similar but is like a 'shortcut' - instead of first showing And here is the issue: in ref.read(itemsProvider).state = [item];
Navigator.of(context).push(...code to push ProcessPage...); I guess this is because I guess I can make the provider non auto-disposed but then I will need to make sure I explicitly reset the state whenever the 'process' is done. I would very much prefer the nice auto-dispose behavior that works in the first use case (the one with the list). I can also use Would anybody have any pointers how to implement my use case AND keep auto-disposing? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Never mind, I restructured the code a bit and now it works (although I don't get why). |
Beta Was this translation helpful? Give feedback.
Never mind, I restructured the code a bit and now it works (although I don't get why).