operator + method
Addition
Implementation
Complex operator +(Object other) {
if (other is Complex) {
return Complex(real + other.real, imaginary + other.imaginary);
} else if (other is num) {
return Complex(real + other, imaginary);
}
throw ArgumentError('Cannot add ${other.runtimeType} to Complex');
}