shouldDispose property
- @override
override
Whether this widget should dispose the model after it's destroyed.
Normally, we want the widget to clean up after itself and dispose its view model. But it's also common for one view model to create and depend on another model. In this case, if we are listening to the sub-model, we don't want to dispose it while the parent model is still using it.
Implementation
@override
bool get shouldDispose => false;