unpack method Null safety

HLC unpack(
  1. String packed
)

Decodes an HLC previously packed with pack, else fails with a FormatException.

Implementation

static HLC unpack(String packed) {
  final parts = packed.split(delimiter);

  return HLC(
    timestamp: int.parse(parts[0]),
    count: int.parse(parts[1], radix: 36),
    node: parts.sublist(2).join(delimiter),
  );
}