Version class
Represents a semantic version in Jetleaf with major, minor, and patch components.
This class is used to define precise versions and to compare versions when evaluating version ranges or conditional processing.
Usage Example:
final version = Version(3, 1, 4);
final other = Version.parse('3.2.0');
print(version < other); // true
print(version >= Version(3,1,0)); // true
- Implemented types
Constructors
Properties
Methods
-
compareTo(
Version other) → int -
Compares this object to another object.
override
-
equalizedProperties(
) → List< Object?> -
Mixin-style contract for value-based equality,
hashCode
, andtoString
. -
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 -
Returns
true
if this version is strictly less thanother
. -
operator <=(
Version other) → bool -
Returns
true
if this version is less than or equal toother
. -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator >(
Version other) → bool -
Returns
true
if this version is strictly greater thanother
. -
operator >=(
Version other) → bool -
Returns
true
if this version is greater than or equal toother
.