Version class

Utility class to represent protocol version in NDEF records.

Versions are encoded as a single byte with major version in the upper 4 bits and minor version in the lower 4 bits.

Constructors

Version({int? value})
Constructs a Version with an optional raw value.
Version.fromDetail(int major, int minor)
Constructs a Version from major and minor version numbers.
Version.fromString(String string)
Constructs a Version from a version string (e.g., "1.2").

Properties

hashCode int
The hash code for this object.
no setterinherited
major int
Gets the major version number.
getter/setter pair
minor int
Gets the minor version number.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
string String
Gets the version as a formatted string (e.g., "1.2").
getter/setter pair
value int
The raw version value as a byte.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setDetail(int major, int minor) → void
Sets the version from major and minor version numbers.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

formattedString(int? value) String
Returns a formatted version string from a raw value.