toHex method

String toHex({
  1. int? outLen,
  2. Endian endian = Endian.big,
})

Implementation

String toHex({int? outLen, Endian endian = Endian.big}) =>
    (endian == Endian.big ? this : this.toList().reversed)
        .map((e) => e.hexByte)
        .join()
        .padLeft(outLen ?? 0, '0');