Sprawdź futrem typu danych
selector.runtimeType // return data type of the variable
Example:
if (selector.runtimeType == int) print("Hello")
Lokesh003
selector.runtimeType // return data type of the variable
Example:
if (selector.runtimeType == int) print("Hello")
void main(){
var a = 'Apple';
var b = 100;
var c = [1, 2, 3, 4, 5];
var d = {
"name": "John Doe",
"age" : 40
};
var e = 1.14;
print(a.runtimeType);
print(b.runtimeType);
print(c.runtimeType);
print(d.runtimeType);
print(e.runtimeType);
}