title: How can you log into google oauth with a preset email and password?
body: <p>I'm working on a flutter app for a client.<br>
  This involves uploading files to a Google drive folder.  </p>
  
  <p>I've got it working with the Google sign in pop-up, but they want it so that the account used is separated from the device accounts.</p>
  
  <p><strong>Is this possible?</strong>  </p>
  
  <p>I don't think service accounts are right because they still want the email and password to be set in the app settings, and from what I understand service accounts need to be made and linked directly in the API console.</p>
  
  <p>EDIT: here's my current code for logging in with the Google sign-in plugin;</p>
  
  <pre><code> static final GoogleSignIn _googleSignIn = GoogleSignIn(
       scopes: [
         g.DriveApi.DriveScope,
         g.DriveApi.DriveMetadataReadonlyScope
       ]
     );
   static dynamic token;
   ...
  
  static login() async{
      try {
        final GoogleSignInAccount googleUser = await _googleSignIn.signIn();
        final GoogleSignInAuthentication googleAuth = await googleUser
        .authentication;
        print("signed in " + googleAuth.accessToken);
        token = googleAuth.accessToken;
        _authHeaders = await _googleSignIn.currentUser.authHeaders;
      }catch(exception){
        //maybe offline
        print("login error: "+exception.toString());
      }
    }
  </code></pre>
  
  <p>So is it possible to use email and password instead of this method (which show's an account selection pop-up)?</p>