Dart BigInt hashCode
Syntax & Examples


BigInt.hashCode property

The `hashCode` property returns the hash code for this BigInt object.


Syntax of BigInt.hashCode

The syntax of BigInt.hashCode property is:

 int hashCode 

This hashCode property of BigInt the hash code for this object.

Return Type

BigInt.hashCode returns value of type int.



✐ Example

1 Get hash code for a BigInt

In this example,

  1. We create a BigInt bigInt with the value 12345678901234567890.
  2. We use the hashCode property to get the hash code for the BigInt.
  3. We print the hash code to standard output.

Dart Program

void main() {
  BigInt bigInt = BigInt.parse('12345678901234567890');
  print('Hash code for BigInt: ${bigInt.hashCode}');
}

Output

Hash code for BigInt: 12345678901234567890

Summary

In this Dart tutorial, we learned about hashCode property of BigInt: the syntax and few working examples with output and detailed explanation for each example.