Created
January 8, 2023 12:51
-
-
Save FlutterWiz/980efdffa56b8fc9e5f2a67cb88d3455 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
part of 'chat_setup_cubit.dart'; | |
@freezed | |
class ChatSetupState with _$ChatSetupState { | |
const factory ChatSetupState({ | |
required ChatUserModel chatUser, | |
required ConnectionStatus webSocketConnectionStatus, | |
required bool isUserCheckedFromChatService, | |
}) = _ChatSetupState; | |
const ChatSetupState._(); | |
factory ChatSetupState.empty() => ChatSetupState( | |
chatUser: ChatUserModel.empty(), | |
webSocketConnectionStatus: ConnectionStatus.disconnected, | |
isUserCheckedFromChatService: false, | |
); | |
bool get isChatUserConnected => chatUser != ChatUserModel.empty(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment