unpack<T extends Object?> method

T unpack<T extends Object?>(
  1. List<int> toDecode
)

Unpack encoded data from the Erlang External Term Format into a Dart object.

The decoded data is then returned as a Dart object. The type of the returned object is specified as T.

Implementation

T unpack<T extends Object?>(List<int> toDecode) {
  final decoder = Decoder(Uint8List.fromList(toDecode));

  return decoder.decode() as T;
}