VersionResolver class

Constructors

VersionResolver()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareVersions(String a, String b) int
Compare two versions.
constraintAllows(String constraint, String version) bool
Check if a target version would satisfy the given constraint.
filterVersions(List<String> versions, {bool includePrerelease = false}) List<String>
Filter versions, excluding prereleases unless includePrerelease is set.
getLatestStable(List<String> versions) String?
Get the latest non-prerelease version from a list.
getVersionsInRange(List<String> allVersions, String fromVersion, String toVersion) List<String>
Get all versions from a list that fall between two versions (exclusive of fromVersion, inclusive of toVersion).
isMajorBump(String from, String to) bool
Check if upgrading from one version to another is a major bump.
isMinorBump(String from, String to) bool
Check if upgrading is a minor bump (same major, higher minor).
isPrerelease(String version) bool
Check if a version is a prerelease.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseConstraint(String constraintStr) → VersionConstraint
Parse a version constraint string.
parseVersion(String versionStr) → Version
Parse a version string into a Version object.
satisfies(String version, String constraint) bool
Check if a version satisfies a constraint.
suggestConstraint(String targetVersion) String
Generate a new caret constraint string for a target version.
toString() String
A string representation of this object.
inherited

Operators

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