ViewModelBuilder<T extends ChangeNotifier>.nonReactive constructor

const ViewModelBuilder<T extends ChangeNotifier>.nonReactive({
  1. required T viewModelBuilder(),
  2. required Widget builder(
    1. BuildContext context,
    2. T model,
    3. Widget? child
    ),
  3. dynamic onModelReady(
    1. T model
    )?,
  4. dynamic onDispose(
    1. T model
    )?,
  5. bool disposeViewModel = true,
  6. bool createNewModelOnInsert = false,
  7. bool fireOnModelReadyOnce = false,
  8. bool initialiseSpecialViewModelsOnce = false,
  9. 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);