Dart Programming - Type test Operators



is Example

void main() { 
   int n = 2; 
   print(n is int); 
} 

It will produce the following output

true 

is! Example

void main() { 
   double  n = 2.20; 
   var num = n is! int; 
   print(num); 
} 

It will produce the following output

true 
dart_programming_operators.htm
Advertisements