decode method

String decode(
  1. Uint8List input, {
  2. bool stream = false,
})

Implementation

String decode(Uint8List input, {bool stream = false}) {
  // Since Dart doesn't have a streaming decode, we ignore the `stream` option.
  if (encoding.toLowerCase() == 'utf-8') {
    return utf8.decode(input);
  } else {
    throw UnsupportedError('The encoding $encoding is not supported.');
  }
}