convert method

  1. @override
List<int> convert(
  1. String input
)
override

Converts input and returns the result of the conversion.

Implementation

@override
List<int> convert(String input) {
  var buffer = Uint8Buffer();
  var lastDigit = _decode(input.codeUnits, 0, input.length, buffer);

  if (lastDigit != null) {
    throw FormatException(
        'Input ended with incomplete encoded byte.', input, input.length);
  }

  return buffer.buffer.asUint8List(0, buffer.length);
}