# Dart Operator

In Dart, operators are special symbols or keywords that are used to perform operations on operands. Dart supports a variety of operators, including arithmetic, assignment, comparison, logical, bitwise, and conditional operators. Here's an overview of some commonly used operators in Dart:

1. **Arithmetic Operators**:
    
    * `+` (addition)
        
    * `-` (subtraction)
        
    * `*` (multiplication)
        
    * `/` (division)
        
    * `%` (modulo, returns the remainder of division)
        
2. **Assignment Operators**:
    
    * `=` (assignment)
        
    * `+=`, `-=`, `*=`, `/=`, `%=` (compound assignment operators)
        
3. **Comparison Operators**:
    
    * `==` (equality)
        
    * `!=` (inequality)
        
    * `>`, `<`, `>=`, `<=` (greater than, less than, greater than or equal to, less than or equal to)
        
4. **Logical Operators**:
    
    * `&&` (logical AND)
        
    * `||` (logical OR)
        
    * `!` (logical NOT)
        
5. **Bitwise Operators**:
    
    * `&` (bitwise AND)
        
    * `|` (bitwise OR)
        
    * `^` (bitwise XOR)
        
    * `~` (bitwise NOT)
        
    * `<<` (left shift)
        
    * `>>` (right shift)
        
6. **Conditional Operator**:
    
    * `condition ? expr1 : expr2` (also known as the ternary operator)
        
7. **Null-aware Operators** (for handling null values):
    
    * `??` (if null)
        
    * `??=` (null-aware assignment)
        
8. **Type Test Operators**:
    
    * `as` (typecast)
        
    * `is` (type test)
        
    * `is!` (negated type test)
        
9. **Others**:
    
    * `..` (cascade operator, allows you to make a sequence of operations on the same object)
        
    * `..?` (conditional cascade operator, similar to `..`, but only calls the methods if the object is not null)
        

Example usage:

```dart
void main() {
  int a = 5;
  int b = 3;
  
  // Arithmetic operators
  int sum = a + b;
  int difference = a - b;
  int product = a * b;
  double quotient = a / b;
  int remainder = a % b;

  // Comparison operators
  bool isEqual = a == b;
  bool isGreaterThan = a > b;

  // Logical operators
  bool result1 = (a > 0) && (b < 10);
  bool result2 = (a < 0) || (b > 10);
  
  // Conditional operator
  int maxValue = (a > b) ? a : b;
  
  // Null-aware operators
  int nullableValue;
  int value = nullableValue ?? 10; // assigns 10 if nullableValue is null
  
  // Type test operators
  var list = [1, 2, 3];
  if (list is List) {
    print('list is a List');
  }
}
```

These are some of the basic operators in Dart. Understanding and effectively using these operators is crucial for writing Dart programs.
