Uint64 constructor

Uint64(
  1. int value
)

Builds from a plain Dart int. Must be non-negative and representable exactly as a double (i.e. <= 2^53, which covers every case where the value didn't already come from hi/lo limbs). For values above 2^53 use fromBigInt or parseHex/parseDecimal.

Implementation

factory Uint64(int value) {
  if (value < 0) {
    throw ArgumentException.invalidOperationArguments(
      "Uint64",
      reason: 'value must be non-negative',
    );
  }
  final hi = (value ~/ 0x100000000) & _mask32;
  final lo = value & _mask32;
  return Uint64._(hi, lo);
}