listType(example) {
var x = example.runtimeType;
if (x == List) {
return true;
} else {
return false;
}
}
print(listType([1, 2, 3, 4]));
You can swap swap x==List with x==List< int> and see the difference!!!
How do i make it so that runtimeType always returns true as long as the return type is a list?