# Operators

1 min read, 88 words dartoperator
  • operators are defined on core as classes and could be @over-ridden

# Types test operator

  1. as -> Excplicit type casting
  2. is -> if not sure of type, used in parametric polymorphic functions
  3. is!

Assign a values to variale, only if it is null

Object, dont want to instantiate multiple times => Singletom Pattern

int? a;
a ??= 5;

# Logical Operators

# nullish operator

Car rewardCar3(Car? dreamCar) => dreamCar ?? Car('Random');

# Enumeration Types

Subscribe to our Newsletter

If you like my work and think it was helpful kindly support my work


Buy Me A Coffee