copyWith method
Creates a copy of this data with the given fields replaced with the new values.
Parameters:
index(int?, optional): New index value.length(int?, optional): New length value.
Returns: A new ChatBubbleData with the specified values updated.
Implementation
ChatBubbleData copyWith({
int? index,
int? length,
}) {
return ChatBubbleData(
index: index ?? this.index,
length: length ?? this.length,
);
}