ViewModelBuilder<T extends ChangeNotifier>.nonReactive constructor
const
ViewModelBuilder<T extends ChangeNotifier>.nonReactive ({
- required T viewModelBuilder(),
- required Widget builder(
- BuildContext context,
- T model,
- Widget? child
- dynamic onModelReady(
- T model
- dynamic onDispose(
- T model
- bool disposeViewModel = true,
- bool createNewModelOnInsert = false,
- 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,
this.onModelReady,
this.onDispose,
this.disposeViewModel = true,
this.createNewModelOnInsert = false,
this.fireOnModelReadyOnce = false,
this.initialiseSpecialViewModelsOnce = false,
Key? key,
}) : providerType = _ViewModelBuilderType.NonReactive,
staticChild = null,
super(key: key);