title: The method 'configure' isn't defined for the type 'FirebaseApp'
body: <p>I'm using firebase Authentication for user login but getting this error message for FirebaseApp Configure Method.<br />
  below is my code.</p>
  <pre><code>import 'package:firebase_auth/firebase_auth.dart';
  import 'package:flutter/material.dart';
  import 'package:cloud_firestore/cloud_firestore.dart';
  import 'package:firebase_core/firebase_core.dart';
  import '../Questions.dart';
  
  class Tasks extends StatefulWidget {
    Tasks({this.uid: &quot;&quot;});
    final String uid;
    @override
    TasksState createState() =&gt; TasksState(uid);
  }
  
  class TasksState extends State&lt;Tasks&gt; {
    var now = DateTime.now();
    bool timeUp = true;
    TasksState(this.userId);
  
    Map&lt;String, dynamic&gt; identifiers = Map.from({
      &quot;answered&quot;: false,
      &quot;value&quot;: false,
      &quot;notDone1&quot;: true,
      &quot;notDone2&quot;: true,
      &quot;defNumber&quot;: -1,
      &quot;hour&quot;: null
    });
    FirebaseAuth auth = FirebaseAuth.instance;
  
    String userId;
    DocumentReference ansRef;
  
    Future&lt;void&gt; configure() async {
      final FirebaseApp app = await FirebaseApp.configure(
          name: 'companionbeta',
          options: const FirebaseOptions(
              googleAppID: '*******************************',
              apiKey: '********************************',
              projectID: '*******************'
  ));
      final FirebaseFirestore firestore = Firestore.instance();
      await firestore.settings(timestampsInSnapshotsEnabled: true);
    }
  
    bool isDepressed(DocumentSnapshot document) {
      document.data.putIfAbsent(&quot;q1&quot;, document[&quot;defNumber&quot;]);
      if (document[&quot;q1&quot;] &lt; 3) return true;
      return false;
    }
  
    @override
    void initState() {
      configure();
      ansRef = Firestore.instance.collection(&quot;answers&quot;).document(userId);
      addData();
      super.initState();
    }
  
    void updateTime(DocumentSnapshot document) async {
      if (document[&quot;hour&quot;] == null)
        await document.reference.updateData({&quot;hour&quot;: now.hour});
      assert(now.hour != null);
      if (document[&quot;hour&quot;] &lt; 24) {
        setState(() {
          timeUp = true;
        });
        await document.reference.updateData({&quot;hour&quot;: document[&quot;hour&quot;] + 24});
      }
    }
  
    void addData() async {
      ansRef.get().then((DocumentSnapshot ds) {
        ds.data.addAll(identifiers);
        updateTime(ds);
        isDepressed(ds);
      });
    }
  
    @override
    Widget build(BuildContext context) {
      return Material(
          child: StreamBuilder(
              stream: Firestore.instance.collection(&quot;answers&quot;).snapshots(),
              builder: (context, snapshot) {
                if (!snapshot.hasData) return Text(&quot;Loading..&quot;);
                DocumentSnapshot doc = snapshot.data.documents[0];
                Map&lt;String, bool&gt; check = Map.from({
                  &quot;answered&quot;: (doc[&quot;answered&quot;] == null) ? false : true,
                  &quot;notDone1&quot;: (doc[&quot;notDone1&quot;] == null) ? false : true,
                  &quot;notDone2&quot;: (doc[&quot;notDone2&quot;] == null) ? false : true,
                  &quot;q1&quot;: (doc[&quot;q1&quot;] == null) ? false : true,
                });
                return builder(context, doc, check);
              }));
    }
  
    Widget builder(BuildContext context, DocumentSnapshot document,
        Map&lt;String, bool&gt; check) {
      return Column(mainAxisSize: MainAxisSize.min, children: &lt;Widget&gt;[
        (check[&quot;answered&quot;] &amp;&amp; timeUp &amp;&amp; !document[&quot;answered&quot;])
            ? askQuestion(document)
            : Container(),
        Flexible(
            child: Card(
          child: ListView(
            children: &lt;Widget&gt;[
              (check[&quot;notDone1&quot;] &amp;&amp;
                      check[&quot;q1&quot;] &amp;&amp;
                      isDepressed(document) &amp;&amp;
                      document[&quot;notDone1&quot;])
                  ? ListTile(
                      contentPadding: EdgeInsets.all(10.0),
                      leading: Icon(Icons.people),
                      title: Text(&quot;Meet more people&quot;),
                      subtitle: Text(&quot;uno dos tres&quot;),
                      trailing: Checkbox(
                        value: false,
                        onChanged: (value) {
                          setState(() {
                            if (value)
                              document.reference.updateData({&quot;notDone1&quot;: false});
                          });
                        },
                      ),
                    )
                  : Container(),
              (check[&quot;notDone2&quot;] &amp;&amp;
                      check[&quot;q1&quot;] &amp;&amp;
                      isDepressed(document) &amp;&amp;
                      document[&quot;notDone2&quot;])
                  ? ListTile(
                      contentPadding: EdgeInsets.symmetric(horizontal: 10.0),
                      leading: Icon(Icons.library_music),
                      title: Text(&quot;Listen to tunes&quot;),
                      subtitle: Text(&quot;uno dos tres&quot;),
                      trailing: Checkbox(
                        value: document[&quot;value&quot;],
                        onChanged: (value) {
                          setState(() {
                            if (value)
                              document.reference.updateData({&quot;notDone2&quot;: false});
                          });
                        },
                      ),
                    )
                  : Container(),
              (check[&quot;q1&quot;] &amp;&amp;
                      check[&quot;notDone1&quot;] &amp;&amp;
                      isDepressed(document) &amp;&amp;
                      !document[&quot;notDone1&quot;])
                  ? Card(
                      child: Expanded(
                      child: Text(&quot;Yay! We are happy today&quot;),
                    ))
                  : Container()
            ],
          ),
          elevation: 2.0,
          margin: EdgeInsets.symmetric(horizontal: 12.0, vertical: 6.0),
        ))
      ]);
    }
  
    Widget askQuestion(DocumentSnapshot document) {
      return Card(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: &lt;Widget&gt;[
            const ListTile(
              leading: Icon(Icons.question_answer),
              title: Text('Ready to answer a few questions?'),
              subtitle: Text('It will only take a minute'),
            ),
            ButtonTheme.bar(
              // make buttons use the appropriate styles for cards
              child: ButtonBar(
                children: &lt;Widget&gt;[
                  FlatButton(
                    child: const Text('Yes!'),
                    onPressed: () {
                      Navigator.of(context).push(MaterialPageRoute(
                          builder: (context) =&gt; Questions(document)));
                    },
                  ),
                  FlatButton(
                    child: const Text('Not now'),
                    onPressed: () {
                      setState(() {
                        document.reference.updateData({&quot;answered&quot;: true});
                      });
                    },
                  ),
                ],
              ),
            ),
          ],
        ),
        elevation: 2.0,
        margin: EdgeInsets.all(12.0),
      );
    }
  }
  
  </code></pre>
  <p>for privacy issue's i'm removed googleID, appkey, and projectId, so ignore that.</p>
  <p>error message.</p>
  <p>The method 'configure' isn't defined for the type 'FirebaseApp'.
  Try correcting the name to the name of an existing method, or defining a method named 'configure'.</p>