deserialize<T> method

T deserialize<T>(
  1. List stream
)

Implementation

T deserialize<T>(List stream) {
  _cache = {};
  _offset = 0;
  _stream = stream;
  final result = _readObject<T>();
  if (_offset != _stream.length) {
    throw StateError(
        'Unable to deserialize. Expected end of straem (${stream.length}) but got $_offset');
  }

  _cache = {};
  _stream = [];
  return result;
}