title: Getter not defined for static variable and also for method declared in the class
body: <p>I have a class AuthService defined under lib/services/authService.dart
  The class has 1 static field and one static method. 
  But I am not able to access the static fields and method in my lib/screenpage.dart </p>
  
  <p>I tried the same class in dartPad and it is working fine. But VS Code shows that the method and getter is not defined for the class</p>
  
  <p>Tried moving around with creating instance variables and also setting getter but it is not working</p>
  
  <p>Tried to restart VS code </p>
  
  <pre><code>class AuthService {
  
  static final FirebaseAuth _auth = FirebaseAuth.instance;
  
  static Future&lt;void&gt; _signInWithEmailAndLink(_userEmail) async =&gt; await _auth.sendSignInWithEmailLink(
        email: _userEmail,
        url: '&lt;Url with domain from your Firebase project&gt;',
        );
  
  }
  
  </code></pre>
  
  <p>And inside my LoginPage.dart </p>
  
  <pre><code>final  auth = await AuthService._auth;
  
  --error ( The getter '_auth' isn't defined for the class 'AuthService'.
  Try importing the library that defines '_auth', correcting the name to the name of an existing getter, or defining a getter or field named '_auth')
  
   validationAndLogin() async {
      await AuthService._signInWithEmailAndLink(_email);
      }
    }
  
  The method '_signInWithEmailAndLink' isn't defined for the class 'AuthService'.
  Try correcting the name to the name of an existing method, or defining a method named '_signInWithEmailAndLink'.dart(undefine
  </code></pre>
  
  <p>I don't know what exactly I am missing in this scenario.</p>