Dart Operator : Type test operators

Dart Operator : Type test operators

ยท

1 min read

  • This Operator use for to comparison.

  • This operator only provide boolean Value means

    " True and False "

Operator SymbolOperator NameOperator Description
isisGives boolean value true as output if the object has specific type
is!is notGives boolean value false as output if the object has specific type
void main()
{
    String a = 'GFG';
    double b = 3.3;

    // Using is to compare
    print(a is String); // true

    // Using is! to compare
    print(b is !int); // true
}
ย