HexString.fromBytes constructor

HexString.fromBytes(
  1. Uint8List l
)

Implementation

factory HexString.fromBytes(Uint8List l) {
  // Attempt to clean up when a user passes in an int list with the ascii
  // representations of 0 and x as the first two elements.
  if (l[1] == 78) {
    l = l.sublist(2);
  }
  return HexString.fromString(hex.encode(l));
}