Answers for "dart get datatype"

0

check data type flutter

selector.runtimeType // return data type of the variable

Example:
if (selector.runtimeType == int) print("Hello")
Posted by: Guest on April-25-2021
0

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"
Posted by: Guest on October-06-2021

Code answers related to "Dart"

Browse Popular Code Answers by Language