operator - method
Subtraction operator.
If the current value is not null
, subtracts other
from it, updates the value, and returns the new value.
If the current value is null
, returns null
.
Implementation
num? operator -(num other) {
if (value != null) {
value = value! - other;
return value;
}
return null;
}