Event constructor

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

Constructor used for json serialization

Implementation

Event({
  this.type = 'local.event',
  this.cid,
  this.connectionId,
  DateTime? createdAt,
  this.me,
  this.user,
  this.message,
  this.totalUnreadCount,
  this.unreadChannels,
  this.reaction,
  this.online,
  this.channel,
  this.member,
  this.channelId,
  this.channelType,
  this.parentId,
  this.hardDelete,
  this.extraData = const {},
  this.isLocal = true,
}) : createdAt = createdAt?.toUtc() ?? DateTime.now().toUtc();