getBytes method
Latin-1 bytes for a string field, matching ISOUtil.CHARSET.
Implementation
Uint8List? getBytes(int field) {
if (!hasField(field)) return null;
final Object? raw = getValue(field);
if (raw is String) return Uint8List.fromList(raw.codeUnits.map((int unit) => unit & 0xFF).toList());
if (raw is Uint8List) return raw;
return null;
}