Precedence Table of Operators in Dart
Description | Operator | Associativity |
---|---|---|
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 |
equailty |
== != | None |
logical AND |
&& | Left |
logical OR |
|| | Left |
if-null |
?? | Left |
conditional | expr ? expr2 : expr3 | Right |
cascade |
.. ?.. | Left |
assignment | = *= /= += -= &= ^= etc. | Right |
Operators in Dart
The operators are special symbols that are used to carry out certain operations on the operands. The Dart has numerous built-in operators which can be used to carry out different functions, for example, ‘+’ is used to add two operands. Operators are meant to carry operations on one or two operands.
Contact Us