Stanza.message constructor

Stanza.message(
  1. {String? to,
  2. String? from,
  3. String? type,
  4. String? id,
  5. List<XMLNode> children = const [],
  6. Map<String, String>? attributes = const {},
  7. String? xmlns}
)

Implementation

factory Stanza.message({
  String? to,
  String? from,
  String? type,
  String? id,
  List<XMLNode> children = const [],
  Map<String, String>? attributes = const {},
  String? xmlns,
}) {
  return Stanza(
    tag: 'message',
    from: from,
    to: to,
    id: id,
    type: type,
    attributes: <String, String>{...attributes!},
    children: children,
    xmlns: xmlns,
  );
}