dart">Future&lt;String&gt; join([String separator = &quot;&quot;]) {
  _Future&lt;String&gt; result = new _Future&lt;String&gt;();
  StringBuffer buffer = new StringBuffer();
  StreamSubscription subscription;
  bool first = true;
  subscription = this.listen((T element) {
    if (!first) {
      buffer.write(separator);
    }
    first = false;
    try {
      buffer.write(element);
    } catch (e, s) {
      _cancelAndErrorWithReplacement(subscription, result, e, s);
    }
  }, onError: (e) {
    result._