operator + method

Option<T> operator +(
  1. Option<T> other
)

Implementation

Option<T> operator +(Option<T> other) {
  if (name != other.name) throw 'Cannot add to options of different type';
  final newOption = copy();
  newOption.value = _getValue(value, other.value, defaultValue);
  return newOption;
}