copyWith method

MessageModel copyWith({
  1. int? id,
  2. String? data,
  3. int? meeting,
  4. User? createdBy,
  5. SendingStatusEnum? sendingStatus,
  6. MessageStatusEnum? status,
  7. int? type,
  8. DateTime? createdAt,
  9. DateTime? updatedAt,
})

Implementation

MessageModel copyWith({
  int? id,
  String? data,
  int? meeting,
  User? createdBy,
  SendingStatusEnum? sendingStatus,
  MessageStatusEnum? status,
  int? type,
  DateTime? createdAt,
  DateTime? updatedAt,
}) {
  return MessageModel(
    id: id ?? this.id,
    data: data ?? this.data,
    meeting: meeting ?? this.meeting,
    createdBy: createdBy ?? this.createdBy,
    sendingStatus: sendingStatus ?? this.sendingStatus,
    status: status ?? this.status,
    type: type ?? this.type,
    createdAt: createdAt ?? this.createdAt,
    updatedAt: updatedAt ?? this.updatedAt,
  );
}