ViewModelBuilder<T extends ChangeNotifier>.nonReactive constructor
const
ViewModelBuilder<T extends ChangeNotifier>.nonReactive ({
- required T viewModelBuilder(),
- required Widget builder(
- BuildContext context,
- T viewModel,
- Widget? child
- @Deprecated('Prefer to use onViewModelReady instead') dynamic onModelReady(
- T viewModel
- dynamic onViewModelReady(
- T viewModel
- dynamic onDispose(
- T viewModel
- bool disposeViewModel = true,
- bool createNewViewModelOnInsert = false,
- bool fireOnViewModelReadyOnce = false,
- @Deprecated('Prefer to use fireOnViewModelReadyOnce') bool fireOnModelReadyOnce = false,
- bool initialiseSpecialViewModelsOnce = false,
- Key? key,
Constructs a ViewModel provider that will not rebuild the provided widget when notifyListeners is called.
Widget from builder will be used as a static child and won't rebuild when notifyListeners is called
Implementation
const ViewModelBuilder.nonReactive({
required this.viewModelBuilder,
required this.builder,
@Deprecated('Prefer to use onViewModelReady instead') this.onModelReady,
this.onViewModelReady,
this.onDispose,
this.disposeViewModel = true,
this.createNewViewModelOnInsert = false,
this.fireOnViewModelReadyOnce = false,
@Deprecated('Prefer to use fireOnViewModelReadyOnce')
this.fireOnModelReadyOnce = false,
this.initialiseSpecialViewModelsOnce = false,
Key? key,
}) : providerType = ViewModelBuilderType.nonReactive,
staticChild = null,
super(key: key);