title: Failed assertion : 'email != null'?
body: <p>does anyone know why my result is null? When I want to SignUp the debug console display : Failed assertion: line 183 pos 12: 'email != null': is not true. And it displays null. This is my SignUp code when I press SignUp Button and the other code ist my auth  class. If anyone knows please comment.</p>
  <pre><code> Future &lt;void&gt; signUp() async {
  
       if(_formKey.currentState.validate()){
         setState(() {
  
           isLoading = true;
         });
  
         await authService.signUpWithEmailAndPassword(_email,
             _password).then((result)  {
           if(result != null){
  
             Map&lt;String,String&gt; userDataMap = {
               &quot;Username&quot; : _Username,
               &quot;Email&quot; : _email,
               &quot;Nation&quot; : _Nation,
             };
  
             databaseService.addUserInfo(userDataMap);
  
             HelperFunction.saveUserLoggedInSharedPreference(true);
             HelperFunction.saveUserNameSharedPreference(_Username);
             HelperFunction.saveUserEmailSharedPreference(_email);
             HelperFunction.saveUserNationSharedPreference(_Nation);
  
             Navigator.pushReplacement(context, MaterialPageRoute(
                 builder: (context) =&gt; LoadingBarForUserCreation()
             ));
           }else{
             print(result);
           }
         }).catchError((e){
           _showSettingPanelForEmail();
         });
       }
  </code></pre>
  <p>AuthService</p>
  <pre><code>class AuthService{
  
    final FirebaseAuth _auth = FirebaseAuth.instance;
  
    Userf _userFromFirebaseUser(User user){
  
      return user != null ? Userf(uid: user.uid) : null;
    }
  
    Stream&lt;Userf&gt; get user {
      return _auth.onAuthStateChanged
          .map(_userFromFirebaseUser);
    }
  
  
    Future signInWithEmailAndPassword(String email, String password) async {
      try {
        User user = (await _auth.signInWithEmailAndPassword(
            email: email, password: password)).user;
        return _userFromFirebaseUser(user);
      } catch (e) {
        print(e.toString());
        return null;
      }
    }
  
    Future signUpWithEmailAndPassword(String email, String password) async {
      try {
        User user = (await _auth.createUserWithEmailAndPassword(
            email: email, password: password)).user;
        return _userFromFirebaseUser(user);
      } catch (e) {
        print(e.toString());
        return null;
      }
    }
  
  
  
  
  
    Future signOut() async {
      try {
        return await _auth.signOut();
      } catch (e) {
        print(e.toString());
        return null;
      }
    }
  
  
  
  }
  
  </code></pre>