copyWith method

Message copyWith({
  1. String? msgId,
  2. String? sequence,
  3. int? msgType,
  4. int? fromId,
  5. String? nickname,
  6. String? avatar,
  7. int? isRevoked,
  8. String? sendTime,
  9. Map<String, dynamic>? extra,
  10. Map<String, dynamic>? quote,
  11. int? talkMode,
  12. int? toFromId,
  13. int? status,
})

Implementation

Message copyWith({
  String? msgId,
  String? sequence,
  int? msgType,
  int? fromId,
  String? nickname,
  String? avatar,
  int? isRevoked,
  String? sendTime,
  Map<String, dynamic>? extra,
  Map<String, dynamic>? quote,
  int? talkMode,
  int? toFromId,
  int? status,
}) {
  return Message(
    msgId: msgId ?? this.msgId,
    sequence: sequence ?? this.sequence,
    msgType: msgType ?? this.msgType,
    fromId: fromId ?? this.fromId,
    nickname: nickname ?? this.nickname,
    avatar: avatar ?? this.avatar,
    isRevoked: isRevoked ?? this.isRevoked,
    sendTime: sendTime ?? this.sendTime,
    extra: extra ?? this.extra,
    quote: quote ?? this.quote,
    talkMode: talkMode ?? this.talkMode,
    toFromId: toFromId ?? this.toFromId,
    status: status ?? this.status,
  );
}