title: Why im getting stackoverflow error using EmailisVerifiyed bool?
body: <p>Im trying to check if user verify his mail and then let logged in if not then not.
  After trying all solution I come to this one .
  Im using stream on onauthchanges so I know its difficult but here's what Im trying I have a wrapper ''home'' so if user is null im returning authenticate page , if and if user email verified im  trying to returning homepage.
  I found that bool on the internet , but when im starting my app im getting stack overflow error in my wrapper class maybe anyone can check:</p>
  <pre><code>class Wrapper extends StatelessWidget {
    static const route='/Wrapper';
    bool get isEmailVerified =&gt; isEmailVerified;
  
    @override
    Widget build(BuildContext context) {
      //Auth.auth().currentUser.isEmailVerified;
      //final user = Provider.of&lt;UserCredential&gt;(context);
  
      final user = Provider.of&lt;User&gt;(context);
  
  
  
      if(user== null ){
        return Authenticate();
      }else if(isEmailVerified==true){
        return Homepage();
      }else{
        return Resedpasswort();
      }
      //return Home or Authenticate widget
    }
  }
  
  </code></pre>
  <p>The resedpasswort page is for just to see if there's an error when all working im deleting this.
  Heres my auth page:</p>
  <pre><code>
  class AuthService {
    final FirebaseAuth _auth = FirebaseAuth.instance;
  
    String error;
  
    //Future&lt;bool&gt; isEmailVerified();
  
    //create user obj based on FirebasedUser
    Model.User _userFromFirebaseUser(User user) {
      return user != null ? Model.User(uid: user.uid) : null;
    }
  
    //auth change user stream
    Stream&lt;Model.User&gt; get user {
      return FirebaseAuth.instance.authStateChanges().map(_userFromFirebaseUser);
    }
  
  //sign in anon
    Future signInAnon() async {
      try {
        UserCredential result = await _auth.signInAnonymously();
        User user = result.user;
  
        return _userFromFirebaseUser(user);
      } catch (e) {
        print(e.toString());
        return null;
      }
    }
  
    //sign in with passwort and email
    Future signIN(String email, String password) async {
      try {
        //if (FirebaseAuth.instance.currentUser.emailVerified) {print('fuckyooooooo');
        UserCredential result = await _auth.signInWithEmailAndPassword(
            email: email.trim(), password: password);
        User user = result.user;
        return _userFromFirebaseUser(user);
      }
  
      on FirebaseAuthException catch (e) {
        switch (e.code) {
          case 'invalid-email':
            {
              return 'Email is not valid';
            }
          case 'user-disabled':
            {
              return 'Account is not active';
            }
          case 'user-not-found':
            {
              return 'No user found';
            }
          case 'wrong-password':
            {
              return 'wrong password';
            }
          default:
            {
              return 'Please verify you account and restart the App';
            }
        }
      }
  
      return null;
    }
  
  
  //register with passwort an email
    Future signUp(String email, String password,) async {
      try {
        UserCredential result = await _auth.createUserWithEmailAndPassword(
            email: email, password: password);
  
        User user = result.user;
        await user.sendEmailVerification();
        return _userFromFirebaseUser(user);
        //await DatbaseService(uid:user.uid).updateUserData('0','new crew member','100','dfdssf');
        //  return ;
  
        //user.sendEmailVerification();
        // ( await DatbaseService(uid:user).updateUserData('0','new crew member','100','dfdssf')).user.uid;;
      } on FirebaseAuthException catch (e) {
        switch (e.code) {
          case 'invalid-email':
            {
              return 'Email is not valid';
            }
          case 'user-disabled':
            {
              return 'Account is not active';
            }
          case 'user-not-found':
            {
              return 'No user found';
            }
          case 'wrong-password':
            {
              return 'wrong password';
            }
          default:
            {
              return 'Unexpected error!';
            }
        }
      }
      return null;
    }
  
    //resetpassword
    Future sendPasswordResetEmail(String email) async {
      try {
        return await _auth.sendPasswordResetEmail(email: email);
      } on FirebaseAuthException catch (e) {
        switch (e.code) {
          case 'invalid-email':
            {
              return 'Email is not valid';
            }
          case 'user-disabled':
            {
              return 'Account is not active';
            }
          case 'user-not-found':
            {
              return 'No user found';
            }
          case 'wrong-password':
            {
              return 'wrong password';
            }
          default:
            {
              return 'Unexpected error!';
            }
            return null;
        }
      }
    }
  
    Future signOut() async {
      try {
        return await _auth.signOut();
      } catch (e) {
        print(e.toString());
        return null;
      }
    }
  }
  </code></pre>
  <p>Heres my future method</p>
  <pre><code>Future&lt;bool&gt; isEmailVerified() async {
      User user = await _auth.currentUser;
      return user.isEmailVerified;
    }
  </code></pre>