allowsAny method
override
Returns true
if this constraint allows any of the versions that other
allows.
Implementation
bool allowsAny(VersionConstraint other) {
if (other.isEmpty) return false;
if (other is Version) return allows(other);
if (other is VersionUnion) {
return other.ranges.any((constraint) => allowsAny(constraint));
}
if (other is VersionRange) {
return !strictlyLower(other, this) && !strictlyHigher(other, this);
}
throw new ArgumentError('Unknown VersionConstraint type $other.');
}