TypeTest Operator
/// TypeTest operators : is , is!
/// is : If the object has the specified type then it is true
/// is! : If the object does not have the specified type then it is true
void main() {
var a = 10;
print(a is int); //output will be boolean value
print(a is String);
print(a is! String);
print("is Operator : ${a is int}");
print("is! Operator : ${a is! int}");
}
Comments
Post a Comment