VersionConstraint.intersection constructor
VersionConstraint.intersection(
- Iterable<
VersionConstraint> constraints
Creates a new version constraint that is the intersection of
constraints
.
It only allows versions that all of those constraints allow. If constraints is empty, then it returns a VersionConstraint that allows all versions.
Implementation
factory VersionConstraint.intersection(
Iterable<VersionConstraint> constraints) {
var constraint = VersionRange();
for (var other in constraints) {
constraint = constraint.intersect(other) as VersionRange;
}
return constraint;
}