📜  如何在 dart 代码示例中打印数据类型

📅  最后修改于: 2022-03-11 14:48:02.639000             🧑  作者: Mango

代码示例1
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"