call method
Create a provider from an external value.
That external value should be immutable and preferably override ==
/hashCode
.
See the documentation of Provider.family for more informations.
Implementation
P call(Param value) {
return _cache.putIfAbsent(value, () {
final provider =
create(value, builder, name == null ? null : '$name ($value)');
assert(
provider._from == null,
'The provider created already belongs to a Family',
);
return provider
.._from = this
.._argument = value;
});
}