BoolType class

A BinaryType for bools.

false is encoded as a uint8 with a value of 0. true is encoded as any other uint8 value (though 1 is commonly used).

Inheritance

Constructors

BoolType()
A BinaryType for bools.
const

Properties

decoder Converter<List<int>, bool>
Returns the decoder of this, converting from T to S.
no setterinherited
encoder Converter<bool, Uint8List>
Returns the encoder from S to T.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
inverted Codec<List<int>, bool>
Inverts this.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(List<int> encoded) bool
Decodes encoded data.
inherited
decodeStream(Stream<List<int>> stream) Future<bool>
Decode a single value from stream.
inherited
encode(bool input) Uint8List
Encodes input.
inherited
encodeInto(bool input, BytesBuilder builder) → void
Encode input into builder.
override
fuse<R>(Codec<List<int>, R> other) Codec<bool, R>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startConversion(void onValue(bool)) BinaryConversion<bool>
Start a new BinaryConversion that converts binary data to this type.
override
toString() String
A string representation of this object.
inherited

Operators

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