SemVer class

Parsed semantic version for comparison.

Implemented types

Constructors

SemVer({required int major, required int minor, required int patch, String? preRelease, String? buildMetadata})
const
SemVer.parse(String version)
Parse a version string, throwing if it cannot be parsed.
factory

Properties

buildMetadata → String?
final
hashCode → int
The hash code for this object.
no setteroverride
major → int
final
minor → int
final
patch → int
final
preRelease → String?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
version → String
The base version string without build metadata (for display).
no setter

Methods

compareTo(SemVer other) → int
Compares this object to another object.
override
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

tryParse(String version) → SemVer?
Parse a version string into a SemVer.