Decodes the Latin-1 bytes (a list of unsigned 8-bit integers) to the corresponding string.
If bytes contains values that are not in the range 0 .. 255, the decoder will eventually throw a FormatException.
If allowInvalid is not provided, it defaults to the value used to create this Latin1Codec.
String decode(List<int> bytes, {bool allowInvalid}) {
allowInvalid ??= _allowInvalid;
if (allowInvalid) {
return const Latin1Decoder(allowInvalid: true).convert(bytes);
} else {
return const Latin1Decoder(allowInvalid: false).convert(bytes);
}
}
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-convert/Latin1Codec/decode.html