Files
eatvio_app/lib/presentation/chat/chat_screen/bloc/chat_state.dart

62 lines
1.2 KiB
Dart

// ignore_for_file: must_be_immutable
part of 'chat_bloc.dart';
/// Represents the state of Chat in the application.
///
class ChatState extends Equatable {
ChatState({
this.chatModelObj,
});
ChatModel? chatModelObj;
@override
List<Object?> get props => [chatModelObj];
ChatState copyWith({ChatModel? chatModelObj}) {
return ChatState(
chatModelObj: chatModelObj ?? this.chatModelObj,
);
}
}
class ChatLoadedState extends ChatState {
ChatLoadedState({
this.selectedDropDownValue,
this.chatModelObj,
});
SelectionPopupModel? selectedDropDownValue;
ChatModel? chatModelObj;
@override
List<Object?> get props => [
selectedDropDownValue,
chatModelObj,
];
ChatState copyWith({
SelectionPopupModel? selectedDropDownValue,
ChatModel? chatModelObj,
}) {
return ChatState(
chatModelObj: chatModelObj ?? this.chatModelObj,
);
}
}
class ChatErrorState extends ChatState {
final String errorMessage;
ChatErrorState(this.errorMessage);
@override
List<Object> get props => [errorMessage];
}
class ChatInitialState extends ChatState {
ChatInitialState({required ChatModel chatModelObj})
: super(chatModelObj: chatModelObj);
}