copyWith method

  1. @override
ReceiverMessage copyWith({
  1. String? id,
  2. bool? isLoading,
  3. List<MessageElement>? elements,
  4. bool? isFailed,
  5. bool? isRead,
  6. String? timestamp,
  7. double? width,
})
override

Implementation

@override
ReceiverMessage copyWith({
  String? id,
  bool? isLoading,
  List<MessageElement>? elements,
  bool? isFailed,
  bool? isRead,
  String? timestamp,
  double? width,
}) {
  final copy = ReceiverMessage(
    name: name,
    timestamp: timestamp ?? this.timestamp,
    elements: elements ?? this.elements,
    isLoading: isLoading ?? this.isLoading,
    id: id ?? this.id,
    width: width ?? this.width,
    isRead: isRead ?? this.isRead,
  );
  return copy;
}