decodeValue method

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

Implementation

@override
String 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 ArgumentError('Not a valid UTF-8 text.');
  }
  return Uint8List.fromList(buf).u8aToString();
}