decode static method

Progress? decode(
  1. Unpacker u
)

Implementation

static Progress? decode(Unpacker u) {
  switch (u.unpackListLength()) {
    case 0: return null;
    case 2: break;
    default: throw DecodeError();
  }
  return Progress(
    value: (u.unpackInt())!,
    total: (u.unpackInt())!,
  );
}