ChatMessage constructor

ChatMessage({
  1. Int64? date,
  2. String? tradeId,
  3. int? traderId,
  4. bool? senderIsTrader,
  5. String? message,
  6. Iterable<Attachment>? attachments,
  7. bool? arrived,
  8. bool? storedInMailbox,
  9. bool? isSystemMessage,
  10. NodeAddress? senderNodeAddress,
  11. String? uid,
  12. String? sendMessageError,
  13. bool? acknowledged,
  14. String? ackError,
  15. SupportType? type,
  16. bool? wasDisplayed,
})

Implementation

factory ChatMessage({
  $fixnum.Int64? date,
  $core.String? tradeId,
  $core.int? traderId,
  $core.bool? senderIsTrader,
  $core.String? message,
  $core.Iterable<Attachment>? attachments,
  $core.bool? arrived,
  $core.bool? storedInMailbox,
  $core.bool? isSystemMessage,
  NodeAddress? senderNodeAddress,
  $core.String? uid,
  $core.String? sendMessageError,
  $core.bool? acknowledged,
  $core.String? ackError,
  SupportType? type,
  $core.bool? wasDisplayed,
}) {
  final $result = create();
  if (date != null) {
    $result.date = date;
  }
  if (tradeId != null) {
    $result.tradeId = tradeId;
  }
  if (traderId != null) {
    $result.traderId = traderId;
  }
  if (senderIsTrader != null) {
    $result.senderIsTrader = senderIsTrader;
  }
  if (message != null) {
    $result.message = message;
  }
  if (attachments != null) {
    $result.attachments.addAll(attachments);
  }
  if (arrived != null) {
    $result.arrived = arrived;
  }
  if (storedInMailbox != null) {
    $result.storedInMailbox = storedInMailbox;
  }
  if (isSystemMessage != null) {
    $result.isSystemMessage = isSystemMessage;
  }
  if (senderNodeAddress != null) {
    $result.senderNodeAddress = senderNodeAddress;
  }
  if (uid != null) {
    $result.uid = uid;
  }
  if (sendMessageError != null) {
    $result.sendMessageError = sendMessageError;
  }
  if (acknowledged != null) {
    $result.acknowledged = acknowledged;
  }
  if (ackError != null) {
    $result.ackError = ackError;
  }
  if (type != null) {
    $result.type = type;
  }
  if (wasDisplayed != null) {
    $result.wasDisplayed = wasDisplayed;
  }
  return $result;
}