Operators are special symbols which perform any arithmetic or logical operations. Let’s see below tables of available operators in dart language.

Let’s see these operators’ examples…

Increment/decrement operators [++ –]

In simple words, this operator basically increases/decreases values of variables.

Let’s see some coding examples…

Code 1:

Code 2: let’s see implementation of decrement operator…

Let’s see another style of it…

Code 3:

Relational operators

Let’s see some examples of this operators [>=(greater than equal) <=(less than equal) >(greater than) <(less than) ]

Code 4:

code 5:

Equality operators [== !=]

Code 6:

code 7:

Logical operators [&&(AND) ||(OR) !(NOT)]

Let’s see usages of AND operator [1×0=0,0×0=0,1×1=1,0×0=0] … generally if both input becomes same then output same.

Code 8:

Let’s see usages of OR operator [0+0=0,1+1=1,1+0=1,0+1=1] … generally at-least one input goes true then output goes true.

Code 9:

Assignment Operators

It treated as =    Let’s see some usages of this…

Code 10:

code 11:

Let’s see some another assignment operators [ += *= -=]

a+=b means a=a+b

a*=b means a=a*b

a-=b means a=a-b

code 12:

Let’s see same use cases for double variables

Code 13:

Divide & modulus operators

Basically, divide a/b but returns double as output in Dart language. modulus a%b , it generally helps to store remainder.

Code 14:

code 15:

Conditional Operators

The conditional operator (? 🙂 is a ternary operator (it takes three operands). The conditional operator works as follows:

• The first operand is implicitly converted to bool. It is evaluated and all side effects are completed before continuing.
• If the first operand evaluates to true (1), the second operand is evaluated.
• If the first operand evaluates to false (0), the third operand is evaluated.

The result of the conditional operator is the result of whichever operand is evaluated — the second or the third. Only one of the last two operands is evaluated in a conditional expression.

Syntax – expression 1 ? expression 2: expression 3

Let’s see usage of this…

Code 16:

code 17:

code 18:

Remember: there have also arithmetic operators like addition (+), subtraction(-), multiplication(*), modulus(%). But we have done several operations with it above…