StoreConnector<St, Model> constructor

const StoreConnector<St, Model>({
  1. Key? key,
  2. required ViewModelBuilder<Model> builder,
  3. bool? distinct,
  4. VmFactory<St, dynamic, dynamic> vm()?,
  5. StoreConverter<St, Model>? converter,
  6. BaseModel? model,
  7. Object? debug,
  8. OnInitCallback<St>? onInit,
  9. OnDisposeCallback<St>? onDispose,
  10. bool rebuildOnChange = true,
  11. ShouldUpdateModel<St>? shouldUpdateModel,
  12. OnWillChangeCallback<St, Model>? onWillChange,
  13. OnDidChangeCallback<St, Model>? onDidChange,
  14. OnInitialBuildCallback<St, Model>? onInitialBuild,
})

Implementation

const StoreConnector({
  Key? key,
  required this.builder,
  this.distinct,
  this.vm, // Recommended.
  this.converter, // Can be used instead of `vm`.
  this.model, // Deprecated.
  this.debug,
  this.onInit,
  this.onDispose,
  this.rebuildOnChange = true,
  this.shouldUpdateModel,
  this.onWillChange,
  this.onDidChange,
  this.onInitialBuild,
})  : assert(converter != null || vm != null || model != null,
          "You should provide the `converter` or the `vm` parameter."),
      assert(converter == null || vm == null,
          "You can't provide both the `converter` and the `vm` parameters."),
      assert(converter == null || model == null,
          "You can't provide both the `converter` and the `model` parameters."),
      assert(vm == null || model == null,
          "You can't provide both the `vm` and the `model` parameters."),
      super(key: key);