mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 18:57:05 +08:00
36 lines
798 B
Dart
36 lines
798 B
Dart
import '../../../core/constants/constants.dart';
|
|
|
|
class ChatResponse {
|
|
final String content;
|
|
final ChatMessageType? messageType;
|
|
|
|
const ChatResponse({
|
|
required this.content,
|
|
this.messageType,
|
|
});
|
|
|
|
ChatResponse copyWith({
|
|
String? content,
|
|
ChatMessageType? messageType,
|
|
}) {
|
|
return ChatResponse(
|
|
content: content ?? this.content,
|
|
messageType: messageType ?? this.messageType,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() =>
|
|
'ChatResponse(content: $content, messageType: $messageType)';
|
|
|
|
@override
|
|
bool operator ==(covariant ChatResponse other) {
|
|
if (identical(this, other)) return true;
|
|
|
|
return other.content == content && other.messageType == messageType;
|
|
}
|
|
|
|
@override
|
|
int get hashCode => content.hashCode ^ messageType.hashCode;
|
|
}
|