VersionRange class

Represents a simple semantic version range in Jetleaf.

A Range defines an inclusive start version and an exclusive end version. It is used by the framework to determine whether a certain version (for example, Dart SDK version) satisfies a condition.

Usage Example:

final range = Range(
  start: Version(3, 0, 0),
  end: Version(4, 0, 0),
);

print(range.contains(Version(3, 2, 1))); // true
print(range.contains(Version(4, 0, 0))); // false

Constructors

VersionRange({Version? start, Version? end})
Represents a simple semantic version range in Jetleaf.
const

Properties

end Version?
The exclusive end of the version range.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start Version?
The inclusive start of the version range.
final

Methods

contains(Version version) bool
Checks if a version is within this range.
equalizedProperties() List<Object?>
Mixin-style contract for value-based equality, hashCode, and toString.
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.
inherited