Check if user status has changed

hello, i’m a flutter beginner. i have created the following code using examples from the internet. this code describes the login with google-firebase. I would now like to add that if the user is deleted from the list in google-firebase, the user has to log in again. As far as I know, this should work with the code: “FirebaseAuth.instance.onAuthStateChanged.listen”,
but I’m not exactly sure, and also don’t know exactly how to implement the code. Thank you for your help.

My Code:

class LoginPageWidget extends StatefulWidget {

LoginPageWidgetState createState() => LoginPageWidgetState();

class LoginPageWidgetState extends State {

GoogleSignIn _googleSignIn = GoogleSignIn();
FirebaseAuth _auth;

bool isUserSignedIn = false;

void initState() {


void initApp() async {
FirebaseApp defaultApp = await Firebase.initializeApp();
_auth = FirebaseAuth.instanceFor(app: defaultApp);

void checkIfUserIsSignedIn() async {

var userSignedIn = await _googleSignIn.isSignedIn();

setState(() {
  isUserSignedIn = userSignedIn;


Please follow this solution for check status.