Bytes.fromHex constructor
Bytes.fromHex(
- String hex
Implementation
factory Bytes.fromHex(String hex) {
if (hex.startsWith(bytesPrefix)) {
return Bytes(
const HexDecoder().convert(hex.replaceFirst(bytesPrefix, '')),
);
}
return Bytes(const HexDecoder().convert(hex));
}