M method

MfuncTuple M(
  1. Uint8List candidbytes,
  2. CandidBytes_i start_i
)
override

Implementation

MfuncTuple M(Uint8List candidbytes, CandidBytes_i start_i) {
    // get BigInt/int of the candid_nat64
    String nat64_asabitstring = bytes_as_the_bitstring(Uint8List.fromList(candidbytes.sublist(start_i, start_i + 8).reversed.toList()));
    BigInt va = BigInt.parse(nat64_asabitstring, radix: 2);
    MfuncTuple m_func_tuple = MfuncTuple(Nat64(va), start_i+8);
    return m_func_tuple;
}