convert method

  1. @override
Uint8List convert(
  1. String input
)
override

Converts input and returns the result of the conversion.

Implementation

@override
Uint8List convert(String input) {
  if (!input.length.isEven) {
    throw FormatException(
      'Invalid input length, must be even.',
      input,
      input.length,
    );
  }

  var bytes = Uint8List(input.length ~/ 2);
  _decode(input.codeUnits, 0, input.length, bytes, 0);
  return bytes;
}