decodeValue method

  1. @override
String decodeValue(
  1. Pipe x,
  2. CType t
)
override

Implementation

@override
decodeValue(Pipe x, CType t) {
  checkType(t);
  final len = lebDecode(x);
  final buf = safeRead((x as Pipe<int>), len.toInt());
  if (!isValidUTF8(Uint8List.fromList(buf))) {
    throw 'Not valid UTF8 text';
  }
  return Uint8List.fromList(buf).u8aToString(useDartEncode: true);
}