copyWith method

Message copyWith({
  1. String? id,
  2. int? time,
  3. String? message,
  4. MessageType? type,
  5. MessageContentType? contentType,
  6. String? sender,
  7. Uint8List? imageData,
})

Implementation

Message copyWith(
    {String? id,
    int? time,
    String? message,
    MessageType? type,
    MessageContentType? contentType,
    String? sender,
    Uint8List? imageData}) {
  return Message(
      id: id ?? this.id,
      time: time ?? this.time,
      message: message ?? this.message,
      type: type ?? this.type,
      contentType: contentType ?? this.contentType,
      sender: sender ?? this.sender,
      imageData: imageData ?? this.imageData);
}