Skip to main content

Operators

Learn about the operators Dart supports.

Dart supports the operators shown in the following table. The table shows Dart's operator associativity and operator precedence from highest to lowest, which are an approximation of Dart's operator relationships. You can implement many of these operators as class members.

DescriptionOperatorAssociativity
unary postfix expr ++    expr --    ()    []    ?[]    .    ?.    ! None
unary prefix - expr    ! expr    ~ expr    ++ expr    -- expr      await expr None
multiplicative *    /    %  ~/ Left
additive+    -Left
shift <<    >>    >>> Left
bitwise AND&Left
bitwise XOR^Left
bitwise OR|Left
relational and type test >=    >    <=    <    as    is    is! None
equality==    !=None
logical AND&&Left
logical OR||Left
if-null??Left
conditional expr1    ?    expr2    :    expr3 Right
cascade..    ?..Left
assignment =    *=    /=    +=    -=    &=    ^=    etc.