autoDispose property

bool get autoDispose

Whether the widget should automatically dispose of the viewModel.

Defaults to true, except when viewModel is provided — in that case the default is false because the caller owns the lifecycle. Override to force a specific value regardless of how the ViewModel was provided.

Implementation

bool get autoDispose => viewModel == null;