operator + method

StringJoiner operator +(
  1. dynamic value
)

Implementation

StringJoiner operator +(final value) {
  if (value is Iterable) {
    value.forEach((v) => this + v);
    return this;
  }
  if (value == null || value == '') return this;
  String s = '';
  if (value is String) {
    s = value;
  } else {
    s = value.toString();
  }

  if (s.isEmpty) return this;
  if (str.isNotEmpty) str += join;
  str += s;

  return this;
}