Version class

Represents a Version consisting of numeric parts, starting with the most significant part.

Versions with different lengths can be compared, because "missing" less significant parts are considered 0.

This statement is true: ``Version('1.2') == Version('1.2.0.0')`

Version implements Comparable but compare operators like ==, <, >, <= and >= can also be used.

Implemented types

Constructors

Version(String versionString)
Version.fromParts(List<int> _parts)

Properties

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

Methods

compareTo(Version other) int
Compares this object to another object.
override
getPart(int index) int
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator <(Version other) bool
operator <=(Version other) bool
operator ==(Object other) bool
The equality operator.
override
operator >(Version other) bool
operator >=(Version other) bool
operator [](int index) int