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, - 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.debug,
this.onInit,
this.onDispose,
this.rebuildOnChange = true,
this.shouldUpdateModel,
this.onWillChange,
this.onDidChange,
this.onInitialBuild,
}) : assert(converter == null || vm == null, "You can't provide both `converter` and `vm`."),
assert(converter != null || vm != null,
"You should provide the `converter` or the `vm` parameter."),
super(key: key);