encodeTo method

void encodeTo(
  1. String type,
  2. dynamic value,
  3. Output dest
)

Encode a value to SCALE value is the value to encode type is the type of the value dest is the destination to write the encoded value to

Implementation

void encodeTo(String type, dynamic value, Output dest) {
  final codec = registry.getCodec(type);
  if (codec == null) {
    throw Exception('Codec not found for type: $type');
  }
  codec.encodeTo(value, dest);
}