ViewModelBuilder<T extends ChangeNotifier>.reactive constructor
const
ViewModelBuilder<T extends ChangeNotifier>.reactive ({
- required T viewModelBuilder(),
- required Widget builder(
- BuildContext context,
- T viewModel,
- Widget? child
- @Deprecated('Prefer to use onViewModelReady instead') dynamic onModelReady(
- T viewModel
- Widget? staticChild,
- 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 fires the builder function when notifyListeners is called in the ViewModel.
Implementation
const ViewModelBuilder.reactive({
required this.viewModelBuilder,
required this.builder,
@Deprecated('Prefer to use onViewModelReady instead') this.onModelReady,
this.staticChild,
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.reactive,
super(key: key);