ViewModelBuilder<T extends ChangeNotifier>.reactive constructor

const ViewModelBuilder<T extends ChangeNotifier>.reactive(
  1. {required T viewModelBuilder(
      ),
    1. required Widget builder(
      1. BuildContext context,
      2. T model,
      3. Widget? child
      ),
    2. Widget? staticChild,
    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 fires the builder function when notifyListeners is called in the ViewModel.

    Implementation

    const ViewModelBuilder.reactive({
      required this.viewModelBuilder,
      required this.builder,
      this.staticChild,
      this.onModelReady,
      this.onDispose,
      this.disposeViewModel = true,
      this.createNewModelOnInsert = false,
      this.fireOnModelReadyOnce = false,
      this.initialiseSpecialViewModelsOnce = false,
      Key? key,
    })  : providerType = _ViewModelBuilderType.Reactive,
          super(key: key);