VersionUnion class

A version constraint representing a union of multiple disjoint version ranges.

An instance of this will only be created if the version can't be represented as a non-compound value.

Implemented types

Constructors

VersionUnion.fromRanges(List<VersionRange> ranges)
Creates a union from a list of ranges with no pre-processing.

Properties

hashCode int
The hash code for this object.
no setteroverride
isAny bool
Returns true if this constraint allows all versions.
no setteroverride
isEmpty bool
Returns true if this constraint allows no versions.
no setteroverride
ranges List<VersionRange>
The constraints that compose this union.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

allows(Version version) bool
Returns true if this constraint allows version.
override
allowsAll(VersionConstraint other) bool
Returns true if this constraint allows all the versions that other allows.
override
allowsAny(VersionConstraint other) bool
Returns true if this constraint allows any of the versions that other allows.
override
difference(VersionConstraint other) VersionConstraint
Returns a VersionConstraint that allows Versions allowed by this but not other.
override
intersect(VersionConstraint other) VersionConstraint
Returns a VersionConstraint that only allows Versions allowed by both this and other.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
union(VersionConstraint other) VersionConstraint
Returns a VersionConstraint that allows Versions allowed by either this or other.
override

Operators

operator ==(Object other) bool
The equality operator.
override