BigInteger.fromInt constructor
BigInteger.fromInt(
- int value
Creates a BigInteger from an int value.
A wrapper class for arbitrary precision integers.
This class wraps Dart's BigInt and provides Java-like functionality similar to Java's BigInteger class.
Example usage:
BigInteger a = BigInteger("123456789012345678901234567890");
BigInteger b = BigInteger.fromInt(42);
BigInteger sum = a + b;
print(sum.toString()); // Very large number
print(a.isProbablePrime()); // Primality test
Implementation
factory BigInteger.fromInt(int value) {
return BigInteger._(BigInt.from(value));
}