VersionConstraintBuilder class

Holds a dependency version

Constructors

VersionConstraintBuilder({required String key, required VersionConstraint versionConstraint, List<String>? comments})
VersionConstraintBuilder.empty()
A version for which no value was supplied yet a key exist. An empty version is treated as 'any' but we need to record that it was empty so when writting out the version we leave it as blank to ensure the fidelity of the original document is maintained.
VersionConstraintBuilder.missing()
Used to indicate that that a version key doesn't exist. This is different from VersionConstraintBuilder.empty() which indicates that a version key was provided but the value was empty.
VersionConstraintBuilder.parse({required String key, String? versionConstraint})
factory

Properties

comments List<String>
no setter
constraint → VersionConstraint
no setter
hashCode int
The hash code for this object.
no setteroverride
isEmpty bool
no setter
key String
final
missing bool
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

parseConstraint(String? version) → VersionConstraint