signOut method

Future<void> signOut()

Signs out the current user.

This will trigger an AuthStateChangeEvent.signedOut event, leading to the clearing of local profile data.

Example:

await authManager.signOut();
print('User signed out.');
// currentUserNotifier.value will be null
// currentProfileNotifier.value will be null

Implementation

Future<void> signOut() async {
  await _supabaseClient.auth.signOut();
  // The listener _onAuthStateChanged will handle clearing local data.
}