decode method

dynamic decode(
  1. String type,
  2. Input input
)

Decode a SCALE encoded value

Implementation

dynamic decode(String type, Input input) {
  final codec = registry.getCodec(type);
  if (codec == null) {
    throw Exception('Codec not found for type: $type');
  }
  final value = codec.decode(input);
  return value;
}