The firebase_auth package provides userChanges stream that is firing user state events for signing in and out etc..., however, when i delete the user from the console, no events received. The documentation states "The purpose of this API is to allow users to subscribe to all user events without having to manually hydrate app state in cases where a manual reload was required (e.g. updateProfile()...)". I tried to call reload on user to check if it is not deleted from the console ?
Future<void> init() async {
await Firebase.initializeApp();
await FirebaseAuth.instance.currentUser?.reload();
}
reload method raises an Exception : PlatformException(firebase_auth, com.google.firebase.auth.FirebaseAuthInvalidUserException: There is no user record corresponding to this identifier. The user may have been deleted., {code: user-not-found, additionalData: {}, message: There is no user record corresponding to this identifier. The user may have been deleted.}).
Is there any way to check if user is deleted or not before proceeding ?