ChatModel constructor

ChatModel({
  1. required String userId,
  2. required String peerId,
  3. required String peerName,
  4. bool peerOnline = false,
  5. int? mostRecentMessageId,
  6. DateTime? lastModified,
  7. DateTime? createdAt,
  8. String? reference,
})

Implementation

ChatModel({
  required this.userId,
  required this.peerId,
  required this.peerName,
  this.peerOnline = false,
  this.mostRecentMessageId,
  this.lastModified,
  this.createdAt,
  this.reference,
}) {
  createdAt ??= DateTime.now();
}