NitroBoolWireCodec class
Built-in wire codec for bool? — the byte layout of NitroOptBool
([1B hasValue][1B value], packed).
- Inheritance
-
- Object
- NitroWireCodec<
bool> - NitroBoolWireCodec
Constructors
- NitroBoolWireCodec()
-
const
Properties
- encodedSize → int
-
Number of bytes this optional type occupies on the wire, including the
leading hasValue flag byte.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
decodeBytes(
Uint8List bytes, [int byteOffset = 0]) → bool? -
Convenience: decodes a buffer produced by encodeBytes (or the bridge).
inherited
-
encodeBytes(
bool? value) → Uint8List -
Convenience: encodes into a fresh buffer of exactly encodedSize bytes.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
ByteData bytes, int byteOffset) → bool? -
Decodes from
byteOffset. First byte is the hasValue flag.override -
toString(
) → String -
A string representation of this object.
inherited
-
write(
ByteData out, int byteOffset, bool? value) → void -
Encodes
value(possibly null) atbyteOffset. Must write exactly encodedSize bytes (outis zeroed when freshly allocated, but a codec must not rely on that for the hasValue flag).override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited