stacked
stacked copied to clipboard
[bug]: createNewViewModelOnInsert Does not Create a new View model when widget is being re inserted in the tree
Describe the bug
- I have a parent widget that is notified by it's view model.
- When the parent is notified to rebuild the widget tree it build a child widget that has it's own viewModel
- This child widget's constructor and build methods are being called but the view model builder is not being triggered.
How is this even possible???????
To reproduce
- Create a parent widget with it's own viewmodel
- trigger a UI rebuild from the viewmodel using notifyListeners()
- Create a child widget that uses a value that's being updated from the parent view model
- When this child widget get's rebuild on notify Listeners, the child widget will get re-built but the value in the child widget's viewmodel is still using the old value that it got during the initial build from the parent
Expected behavior
No response
Screenshots
No response
Additional Context
No response
Interesting, can you please make a small example using the stacked_cli to generate the app.
This will allow us to reproduce and see what you need and fix it.