copyWith method
Implementation
ChatState copyWith({
List<ChatMessage>? messages,
bool? isLoading,
bool? isRestoring,
bool? isReadOnly,
String? error,
}) {
return ChatState(
messages: messages ?? this.messages,
isLoading: isLoading ?? this.isLoading,
isRestoring: isRestoring ?? this.isRestoring,
isReadOnly: isReadOnly ?? this.isReadOnly,
error: error,
);
}