Dart BigInt runtimeType
Syntax & Examples
BigInt.runtimeType property
The `runtimeType` property provides a representation of the runtime type of the given BigInt object.
Syntax of BigInt.runtimeType
The syntax of BigInt.runtimeType property is:
Type runtimeType
This runtimeType property of BigInt a representation of the runtime type of the object.
Return Type
BigInt.runtimeType returns value of type Type
.
✐ Example
1 Using BigInt
In this example,
- We create a BigInt variable
bigInt
with the value -12345. - We use the
runtimeType
property to get the runtime type of the BigInt. - We print the result to standard output.
Dart Program
void main() {
BigInt bigInt = BigInt.from(-12345);
Type type = bigInt.runtimeType;
print('The runtime type of $bigInt is $type');
}
Output
The runtime type of -12345 is int
Summary
In this Dart tutorial, we learned about runtimeType property of BigInt: the syntax and few working examples with output and detailed explanation for each example.