title: Flutter: Instance member 'signInWithGoogle' can't be accessed using static access. (static_access_to_instance_member at )
body: <p>I try to lint for my Flutter project, I have a class API to log in and log out google account, Linter prefers to remove static before these methods (login with Google and sign out). I cannot call these functions in view. Here my code:</p>
  
  <p>API.dart</p>
  
  <pre><code>class FBApi {
  FBApi(this.firebaseUser);
  
    ...
  
    Future&lt;FBApi&gt; signInWithGoogle() async {
      final GoogleSignInAccount googleUser = await _googleSignIn.signIn();
      final GoogleSignInAuthentication googleAuth =
          await googleUser.authentication;
  
      ...
    }
  
  
  Future&lt;void&gt; signOut() async {
      await _auth.signOut().then((_) {
        print('***** log out...what the hell?');
        _googleSignIn.disconnect();
        _googleSignIn.signOut();
        // Navigator.of(context).pushNamedAndRemoveUntil("/login", ModalRoute.withName("/home"));
      });
    }
  }
  </code></pre>
  
  <p>Login.dart error above</p>
  
  <pre><code>Future&lt;bool&gt; _loginUser() async {
      final FBApi api = await FBApi.signInWithGoogle();---&gt; error
      if (api != null) {
        return true;
      } else {
        return false;
      }
    }
  </code></pre>
  
  <p>Logout.dart</p>
  
  <pre><code>Future&lt;void&gt; _signOut() async {
      try {
        await FBApi.signOut();
      } catch (e) {
        print(e);
      }
    }
  </code></pre>