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

Popular posts from this blog

Pagination with Bloc Pattern in Flutter

Pagination First Practical in Flutter

ExpansionPanel with ExpansionPanelList with Complete Collapse Operation in Flutter