title: Flutter User creation and Signing in
body: <p><strong>Here is my code</strong>
  I am trying to run this code with no avail.</p>
  <pre><code>import 'package:firebase_auth/firebase_auth.dart';
  
  class AuthClass {
    FirebaseAuth auth = FirebaseAuth.instance;
    //create account
  
    Future&lt;String&gt; createAccount(
        {required String email, required String password}) async {
      try {
        await auth.createUserWithEmailAndPassword(
            email: email, password: password);
        return &quot;Account created&quot;;
      } on FirebaseAuthException catch (e) {
        if (e.code == 'weak-password') {
          return 'The password provided is too weak.';
        } else if (e.code == 'email-already-in-use') {
          return 'The account already exists for that email.';
        }
      } catch (e) {
        return 'Error Occured';
      }
    }
  
    //sign in user
  
    Future&lt;String&gt; signIn(
        {required String email, required String password}) async {
      try {
        await auth.signInWithEmailAndPassword(email: email, password: password);
      } on FirebaseAuthException catch (e) {
        if (e.code == 'user-not-found') {
          return 'No user found for that email.';
        } else if (e.code == 'wrong-password') {
          return 'Wrong password provided for that user.';
        }
      }
    }
  
    // reset password
  
    Future&lt;String&gt; resetPassword({
      required String email,
    }) async {
      try {
        await auth.sendPasswordResetEmail(
          email: email,
        );
        return 'Email Sent';
      } catch (e) {
        return 'Error Occured';
      }
    }
  
    //sign out
  
    void signOut() {
      auth.signOut();
    }
  }
  </code></pre>
  <p><strong>I need some help I am getting this error,</strong></p>
  <p>The body might complete normally, causing 'null' to be returned, but the return type is a potentially non-nullable type.
  Try adding either a return or a throw statement at the end.</p>
  <p>Future signIn(...) &quot;signIn&quot;
  Future createAccount(...) &quot;createAccount&quot;
  is where i am getting the error</p>