write method
void
write(
- dynamic value
Implementation
void write(dynamic value) {
switch (value) {
case null:
writeNil();
case bool v:
writeBoolean(v);
case num v:
writeNum(v);
case String v:
writeString(v);
case DateTime v:
writeDateTime(v);
case ByteData v:
writeByteData(v);
case TypedData v:
writeTypedData(v);
case ByteBuffer v:
writeByteBuffer(v);
case List<dynamic> v:
writeArray(v);
case Map<dynamic, dynamic> v:
writeMap(v);
case MessagePackObject v:
writeMessage(v);
default:
throw const FormatException("Unexpected type while packing");
}
}