dart check type of object code example
Example 1: how to find the type of object in dart
var x = [32,4424];
print(x.runtimeType);
O/P:-
JSArray<int>
Example 2: dart how to tell if an object is an instance of a class
if (emp is Person) {
// Type check
emp.firstName = 'Bob';
}