Reference class

Main class to read a value out of a FlexBuffer.

This class let you access values stored in the buffer in a lazy fashion.

Properties

blobValue Uint8List?
Returns Uint8List value or null otherwise.
no setter
boolValue bool?
If this isBool, returns the bool value. Otherwise, returns null.
no setter
doubleValue double?
Returns double, if the underlying value isDouble.
no setter
hashCode int
The hash code for this object.
no setterinherited
intValue int?
Returns an int, if the underlying value can be represented as an int.
no setter
isBlob bool
Returns true if the underlying value was encoded as a blob.
no setter
isBool bool
Returns true if the underlying value was encoded as a bool.
no setter
isDouble bool
Returns true if the underlying value was encoded as a float (direct or indirect).
no setter
isInt bool
Returns true if the underlying value was encoded as an int or uint (direct or indirect).
no setter
isMap bool
Returns true if the underlying value points to a map.
no setter
isNull bool
Returns true if the underlying value is null.
no setter
isNum bool
Returns true if the underlying value can be represented as num.
no setter
isString bool
Returns true if the underlying value was encoded as a string or a key.
no setter
isVector bool
Returns true if the underlying value points to a vector.
no setter
json String
Returns a minified JSON representation of the underlying FlexBuffer value.
no setter
length int
Returns the length of the underlying FlexBuffer value. If the underlying value is null the length is 0. If the underlying value is a number, or a bool, the length is 1. If the underlying value is a vector, or map, the length reflects number of elements / element pairs. If the values is a string or a blob, the length reflects a number of bytes the value occupies (strings are encoded in utf8 format).
no setter
mapKeyIterable Iterable<String>
Get an iterable for keys if the underlying flexBuffer value is a map. Otherwise throws an exception.
no setter
mapValueIterable Iterable<Reference>
Get an iterable for values if the underlying flexBuffer value is a map. Otherwise throws an exception.
no setter
numValue num?
Returns num, if the underlying value is numeric, be it int uint, or float (direct or indirect).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringValue String?
Returns String value or null otherwise.
no setter
vectorIterable Iterable<Reference>
Get an iterable if the underlying flexBuffer value is a vector. Otherwise throws an exception.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](Object key) Reference
Can be used with an int or a String value for key. If the underlying value in FlexBuffer is a vector, then use int for access. If the underlying value in FlexBuffer is a map, then use String for access. Returns Reference value. Throws an exception when key is not applicable.

Static Methods

fromBuffer(ByteBuffer buffer) Reference
Use this method to access the root value of a FlexBuffer.