decode method

  1. @override
(dynamic, int) decode(
  1. Uint8List data,
  2. int offset
)
override

Decodes a value of this type from data at the given offset. Returns the decoded value and the number of bytes consumed.

Implementation

@override
(dynamic, int) decode(Uint8List data, int offset) {
  final addressBytes = data.sublist(offset + 12, offset + 32);
  final hex =
      addressBytes.map((b) => b.toRadixString(16).padLeft(2, '0')).join();
  return ('0x$hex', 32);
}