get type of variable dart 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 check type of variable
class Foo { }
main() {
var foo = new Foo();
if (foo is Foo) {
print("it's a foo!");
}
}