title: The method 'signInWithGoogle' isn't defined for the class 'FirebaseAuth'
body: <p>I am trying to learn how to get a flutter app to login to firebase auth. I've created a new flutter project using the android studio plugin and added the dependencies and code from the <a href="https://pub.dartlang.org/packages/firebase_auth" rel="noreferrer">firebase_auth page</a>.</p>
  
  <p>I'm getting the error <em>"The method 'signInWithGoogle' isn't defined for the class 'FirebaseAuth'"</em> when trying to call the method in the FirebaseAuth.instance (_auth). Here's the code:</p>
  
  <pre><code>import 'package:flutter/material.dart';
  import 'package:google_sign_in/google_sign_in.dart';
  import 'package:firebase_auth/firebase_auth.dart';
  
  void main() =&gt; runApp(MyApp());
  
  class MyApp extends StatelessWidget {
    // This widget is the root of your application.
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: MyHomePage(title: 'Flutter Demo Home Page'),
      );
    }
  }
  
  class MyHomePage extends StatefulWidget {
    MyHomePage({Key key, this.title}) : super(key: key);
  
    // This widget is the home page of your application. It is stateful, meaning
    // that it has a State object (defined below) that contains fields that affect
    // how it looks.
  
    // This class is the configuration for the state. It holds the values (in this
    // case the title) provided by the parent (in this case the App widget) and
    // used by the build method of the State. Fields in a Widget subclass are
    // always marked "final".
  
    final String title;
  
    @override
    _MyHomePageState createState() =&gt; _MyHomePageState();
  }
  
  class _MyHomePageState extends State&lt;MyHomePage&gt; {
    int _counter = 0;
  
    void _incrementCounter() {
      setState(() {
        _counter++;
      });
    }
  
    final GoogleSignIn _googleSignIn = GoogleSignIn();
    final FirebaseAuth _auth = FirebaseAuth.instance;
  
    Future&lt;FirebaseUser&gt; _handleSignIn() async {
      GoogleSignInAccount googleUser = await _googleSignIn.signIn();
      GoogleSignInAuthentication googleAuth = await googleUser.authentication;
      FirebaseUser user = await _auth.signInWithGoogle(
        accessToken: googleAuth.accessToken,
        idToken: googleAuth.idToken,
      );
      print("signed in " + user.displayName);
      return user;
    }
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          title: Text(widget.title),
          actions: &lt;Widget&gt;[      // Add 3 lines from here...
            new IconButton(icon: const Icon(Icons.mic), onPressed: () {
              _handleSignIn()
                  .then((FirebaseUser user) =&gt; print(user))
                  .catchError((e) =&gt; print(e));
            })
          ],
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: &lt;Widget&gt;[
              Text(
                'You have pushed the button this many times:',
              ),
              Text(
                '$_counter',
                style: Theme.of(context).textTheme.display1,
              ),
            ],
          ),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: _incrementCounter,
          tooltip: 'Increment',
          child: Icon(Icons.add),
        ), // This trailing comma makes auto-formatting nicer for build methods.
      );
    }
  }
  </code></pre>
  
  <p>Pubspec.yaml:</p>
  
  <pre><code>name: flutter_auth
  description: Trying out firebase_auth
  
  version: 1.0.0+1
  
  environment:
    sdk: "&gt;=2.0.0-dev.68.0 &lt;3.0.0"
  
  dependencies:
    flutter:
      sdk: flutter
    cupertino_icons: ^0.1.2
  
    google_sign_in: ^4.0.0
    firebase_auth: ^0.8.0+1
  
  dev_dependencies:
    flutter_test:
      sdk: flutter
  
  
  flutter:
  
    uses-material-design: true
  </code></pre>