feat(chat): Messages list fill, message model

This commit is contained in:
2024-05-07 13:02:59 +03:00
parent d537a05fac
commit 7279ff69a8
4 changed files with 67 additions and 21 deletions

View File

@@ -22,26 +22,18 @@ class ChatState extends Equatable {
}
class ChatLoadedState extends ChatState {
ChatLoadedState({
this.selectedDropDownValue,
this.chatModelObj,
});
SelectionPopupModel? selectedDropDownValue;
ChatLoadedState({this.chatModelObj, this.messages});
ChatModel? chatModelObj;
List<ChatMessageModel>? messages;
@override
List<Object?> get props => [
selectedDropDownValue,
chatModelObj,
];
ChatState copyWith({
SelectionPopupModel? selectedDropDownValue,
ChatModel? chatModelObj,
}) {
return ChatState(
List<Object?> get props => [chatModelObj, messages];
ChatLoadedState copyWith(
{ChatModel? chatModelObj, List<ChatMessageModel>? messages}) {
return ChatLoadedState(
chatModelObj: chatModelObj ?? this.chatModelObj,
messages: messages ?? this.messages,
);
}
}