# copyWith method

Stanza copyWith(

1. {String? id,
2. Object? from = _stanzaNotDefined,
3. String? to,
4. String? type,
5. List <XMLNode>? children,
6. String? xmlns}

)

## Implementation

    Stanza copyWith({
      String? id,
      Object? from = _stanzaNotDefined,
      String? to,
      String? type,
      List<XMLNode>? children,
      String? xmlns,
    }) {
      return Stanza(
        tag: tag,
        to: to ?? this.to,
        from: from != _stanzaNotDefined ? from as String? : this.from,
        id: id ?? this.id,
        type: type ?? this.type,
        children: children ?? this.children,
        attributes: {
          ...attributes.cast<String, String>(),
        },
        xmlns: xmlns ?? this.xmlns,
      );
    }