Version class
A version class that can be used to compare versions.
Constructors
Properties
- build → int
-
final
-
components
→ List<
int> -
Returns the version components as a list.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- major → int
-
final
- minor → int
-
final
- patch → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
change(
{int? major, int? minor, int? patch, int? build}) → Version - Changes the version by the given amounts.
-
decrease(
{int major = 0, int minor = 0, int patch = 0, int build = 0}) → Version - Decreases the version by the given amounts.
-
increase(
{int major = 0, int minor = 0, int patch = 0, int build = 0}) → Version - Increases the version by the given amounts.
-
isEqualTo(
Version other) → bool - Returns true if this version is equal to the given version.
-
isHigherThan(
Version other) → bool - Returns true if this version is higher than the given version.
-
isLowerThan(
Version other) → bool - Returns true if this version is lower than the given version.
-
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 ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
compareVersionsMMPB(
Version version1, Version version2) → int - Compares two versions formatted <MAJOR.MINOR.PATCH+BUILD>, e.g. 0.1.2+3. Returns 1 if version1 is higher, -1 if version2 is higher, 0 if both are equal.