DecodedContent.fromJson constructor
Implementation
factory DecodedContent.fromJson(Map<String, dynamic> j) {
Uint8List raw;
try {
raw = base64.decode(_str(j['raw']));
} catch (_) {
raw = Uint8List(0);
}
final eci = j['eci'];
final fnc1 = j['fnc1'];
return DecodedContent(
_str(j['text']),
raw,
Charset.from(j['charset']),
eci is List ? _objList(eci).map(EciSegment.fromJson).toList() : null,
fnc1 == null ? null : Fnc1Position.from(fnc1));
}