Created
January 8, 2023 12:46
-
-
Save FlutterWiz/b5fbb4452a207a6c1523dc09351089d2 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
Future<void> signOut() async { | |
await _authService.signOut(); | |
await _chatService.disconnectUser(); | |
} | |
Future<void> _listenAuthStateChangesStream(AuthUserModel authUser) async { | |
emit( | |
state.copyWith( | |
isInProgress: true, | |
authUser: authUser, | |
isUserCheckedFromAuthService: true, | |
), | |
); | |
if (state.isLoggedIn) { | |
await _chatService.connectTheCurrentUser(); | |
emit(state.copyWith(authUser: authUser, isInProgress: false)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment