copyWith method

TypingIndicator copyWith({
  1. User? sender,
  2. String? receiverId,
  3. String? receiverType,
  4. Map<String, dynamic>? metadata,
  5. DateTime? lastTimestamp,
  6. String? typingStatus,
})

Creates a copy of this TypingIndicator with the given fields replaced.

Android Reference: Setters in TypingIndicator.java

Implementation

TypingIndicator copyWith({
  User? sender,
  String? receiverId,
  String? receiverType,
  Map<String, dynamic>? metadata,
  DateTime? lastTimestamp,
  String? typingStatus,
}) {
  return TypingIndicator(
    sender: sender ?? this.sender,
    receiverId: receiverId ?? this.receiverId,
    receiverType: receiverType ?? this.receiverType,
    metadata: metadata ?? this.metadata,
    lastTimestamp: lastTimestamp ?? this.lastTimestamp,
    typingStatus: typingStatus ?? this.typingStatus,
  );
}