StoreConnector<St, Model> constructor
const
StoreConnector<St, Model> ({
- Key? key,
- required ViewModelBuilder<
Model> builder, - bool? distinct,
- VmFactory<
St, dynamic, dynamic> vm()?, - StoreConverter<
St, Model> ? converter, - BaseModel? model,
- Object? debug,
- OnInitCallback<
St> ? onInit, - OnDisposeCallback<
St> ? onDispose, - bool rebuildOnChange = true,
- ShouldUpdateModel<
St> ? shouldUpdateModel, - OnWillChangeCallback<
St, Model> ? onWillChange, - OnDidChangeCallback<
St, Model> ? onDidChange, - 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);