union method
Union with another constraint.
Implementation
@override
VersionConstraint union(VersionConstraint other) {
if (other is VersionRange) {
return VersionUnion([...ranges, other]);
}
if (other is VersionUnion) {
return VersionUnion([...ranges, ...other.ranges]);
}
return this;
}