copyWith method

Event copyWith({
  1. String? type,
  2. String? cid,
  3. String? channelId,
  4. String? channelType,
  5. String? connectionId,
  6. DateTime? createdAt,
  7. OwnUser? me,
  8. User? user,
  9. Message? message,
  10. EventChannel? channel,
  11. Member? member,
  12. Reaction? reaction,
  13. int? totalUnreadCount,
  14. int? unreadChannels,
  15. bool? online,
  16. String? parentId,
  17. bool? hardDelete,
  18. Map<String, Object?>? extraData,
})

Creates a copy of Event with specified attributes overridden.

Implementation

Event copyWith({
  String? type,
  String? cid,
  String? channelId,
  String? channelType,
  String? connectionId,
  DateTime? createdAt,
  OwnUser? me,
  User? user,
  Message? message,
  EventChannel? channel,
  Member? member,
  Reaction? reaction,
  int? totalUnreadCount,
  int? unreadChannels,
  bool? online,
  String? parentId,
  bool? hardDelete,
  Map<String, Object?>? extraData,
}) =>
    Event(
      type: type ?? this.type,
      cid: cid ?? this.cid,
      connectionId: connectionId ?? this.connectionId,
      createdAt: createdAt ?? this.createdAt,
      me: me ?? this.me,
      user: user ?? this.user,
      message: message ?? this.message,
      totalUnreadCount: totalUnreadCount ?? this.totalUnreadCount,
      unreadChannels: unreadChannels ?? this.unreadChannels,
      reaction: reaction ?? this.reaction,
      online: online ?? this.online,
      channel: channel ?? this.channel,
      member: member ?? this.member,
      channelId: channelId ?? this.channelId,
      channelType: channelType ?? this.channelType,
      parentId: parentId ?? this.parentId,
      hardDelete: hardDelete ?? this.hardDelete,
      extraData: extraData ?? this.extraData,
      isLocal: isLocal,
    );