decode method

  1. @override
PortableTypeDef decode(
  1. Input input
)
override

Implementation

@override
PortableTypeDef decode(Input input) {
  // Decode path as sequence of strings (not joined with ::)
  final path = SequenceCodec(StrCodec.codec).decode(input);

  // Decode type parameters
  final params = SequenceCodec(TypeParameter.codec).decode(input);

  // Decode type definition variant
  final typeDef = TypeDef.codec.decode(input);

  // Decode documentation
  final docs = SequenceCodec(StrCodec.codec).decode(input);

  return PortableTypeDef(path: path, params: params, typeDef: typeDef, docs: docs);
}