Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

how to print data types in dart

int integerValue = 2;
double doubleValue = 3.337;
var operationResult = integerValue * doubleValue; // operationResult is of
// double datatype.

print('$operationResult, type: ' + operationResult.runtimeType.toString());  // prints "6.674, type: double"
print(operationResult.runtimeType);  // prints "double"
 
PREVIOUS NEXT
Tagged: #print #data #types #dart
ADD COMMENT
Topic
Name
1+3 =