title: Getter isn't defined for the class. What am i doing wrong here?
body: <p>I'm following a tutorial building my first login system with Flutter. I stumbled upon a getter error I can't resolve.</p>
  
  <p>Before I refactored the code to move the auth parts into their own file, everything was working fine.</p>
  
  <p>Here's the problematic code:</p>
  
  <pre><code>abstract class BaseAuth {
    Future&lt;String&gt; signInWithEmailAndPassword(String email, String password);
  }
  
  class Auth implements BaseAuth {
    Future&lt;String&gt; signInWithEmailAndPassword(String email, String password) async {
       FirebaseUser user = (await
        FirebaseAuth.instance.signInWithEmailAndPassword(
          email: email,
          password: password
        )).user;
      return user.uid;
    }
  }
  </code></pre>
  
  <p>Here's how I try to use it:</p>
  
  <pre><code>class LoginPage extends StatefulWidget {
    LoginPage({this.auth});
    final BaseAuth auth;
  
    @override
    State&lt;StatefulWidget&gt; createState() =&gt; _LoginPageState();
  }
  
  enum FormType {
    login,
    register
  }
  
  ...
  
  class _LoginPageState extends State&lt;StatefulWidget&gt; {
    final formKey = GlobalKey&lt;FormState&gt;();
  
    String _email;
    String _password;
    FormType _formType = FormType.login;
  
    void validateAndSubmit() async {
      if (validateAndSave()) {
        try {
          if (_formType == FormType.login) {
            String userID = await widget.auth.singInWithEmailAndPassword(_email,_password);
            print('Signed in as $userID');
          } ...
        } catch(e) {
          print('Error: $e');
        }
      }
    }
  ...
  }
  </code></pre>
  
  <p>This is the error message I receive:
  "The getter 'auth' isn't defined for the class StatefulWidget".</p>
  
  <p>The code works just fine in the tutorial.</p>
  
  <p>I keep looking for differences between our codebases but there's nothing that seems out of place to me. Maybe someone can help an improver out?</p>