copyWith method

  1. @override
ChatModel copyWith({
  1. String? id,
  2. List<ChatMessageModel>? messages,
  3. int? unreadMessages,
  4. DateTime? lastUsed,
  5. ChatMessageModel? lastMessage,
  6. bool? canBeDeleted,
})
override

Implementation

@override
ChatModel copyWith({
  String? id,
  List<ChatMessageModel>? messages,
  int? unreadMessages,
  DateTime? lastUsed,
  ChatMessageModel? lastMessage,
  bool? canBeDeleted,
}) =>
    ChatModel(
      id: id ?? this.id,
      messages: messages ?? this.messages,
      unreadMessages: unreadMessages ?? this.unreadMessages,
      lastUsed: lastUsed ?? this.lastUsed,
      lastMessage: lastMessage ?? this.lastMessage,
      canBeDeleted: canBeDeleted ?? this.canBeDeleted,
    );