decodeSync<T> static method
Implementation
static T decodeSync<T>(List<int> value, Decodable<T> decodable) {
final lines = _LineSplitter.convert(value);
Map<int, _ReferenceValue>? refs = {};
final marker = refs[0] = _SyncReferenceValue(); // Initialize with a value for marker 0
for (final line in lines) {
if (line.isEmpty) {
continue; // Skip empty lines
}
_parseBytes(line, refs, true);
}
late T result;
marker.decode<T>(decodable).get((v) => result = v);
return result;
}