title: The getter 'email' was called on null-Flutter/Firebase
body: <p>I am new to flutter and needs help in a small segment of code. Although my code works but it shows an error/red screen first(for milliseconds). When I get email of logged in user in this way: <code>this._user?.email,</code> it shows:</p>
  
  <blockquote>
    <p>A non-null String must be provided to a Text widget.
    Failed assertion: 'data != null'</p>
  </blockquote>
  
  <p>And when I get email in this way: <code>_user.email,</code> it shows:</p>
  
  <blockquote>
    <p>The getter 'email' was called on null.</p>
    
    <p>Receiver: null </p>
    
    <p>Tried calling: email</p>
  </blockquote>
  
  <p>Kindly suggest how to throw and catch this exception or fix this issue. Any kind of help would be highly appreciated and opinion is welcome. My full piece of code is here:</p>
  
  <pre><code>class MyAccountSetting extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        home: AccountSetting(),
      );
    }
  }
  
  class AccountSetting extends StatefulWidget {
    @override
    State&lt;StatefulWidget&gt; createState() {
      return new AccountSettings();
    }
  }
  
  class AccountSettings extends State&lt;AccountSetting&gt; {
    final FirebaseAuth _auth = FirebaseAuth.instance;
    FirebaseUser _user;
  
    @override
    void initState() {
      super.initState();
      initUser();
    }
    initUser() async {
      _user = await _auth.currentUser();
      setState(() {});
    }
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        body: SingleChildScrollView(
          child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: &lt;Widget&gt;[
                Container(
                  margin: const EdgeInsets.only(top: 10.0),
                ),
                Row(
                  mainAxisAlignment: MainAxisAlignment.start,
                  children: &lt;Widget&gt;[
                    IconButton(
                      icon: Icon(Icons.mail),
                      iconSize: 30,
                      onPressed: () {},
                    ),
                    Text(
                      _user.email,
  //                    this._user?.email,
                      style: TextStyle(fontSize: 18),
                    ),
                  ],
                ),
              ]
          ),
        ),
      );
    }
  }
  </code></pre>