VersionUnion class Null safety

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. [...]
read-only, override
isAny bool
Returns true if this constraint allows all versions.
read-only, override
isEmpty bool
Returns true if this constraint allows no versions.
read-only, override
ranges List<VersionRange>
The constraints that compose this union. [...]
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

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 non-existent 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