Uint32.fromBigInt constructor

Uint32.fromBigInt(
  1. BigInt value
)

Implementation

factory Uint32.fromBigInt(BigInt value) {
  if (value.isNegative) {
    throw ArgumentException.invalidOperationArguments(
      "fromBigInt",
      reason: 'value must be non-negative',
    );
  }
  return Uint32._(value.toUnsigned(32).toInt());
}