title: The getter was called on null but the widgets still builds fine
body: <p>I'm trying to implement Provider instead of using State so after reading some tutorials, that are little hard to me to understand, because I didn't find something clear to say: "You're going to use Firebase, then here you should use ChangeNotifierProvider or Provider or StreamProvider etc."</p>
  
  <p>So I found a tutorial by Jeff Delaney at Fireship that I tried to apply to my use case, but despite it works I'm not sure I did it properly, mostly because I get this message saying "The getter was called on null". I can suppress it by putting an "?" like user?.name but I want to understand what is going on and why despite the error the code still works fine.</p>
  
  <p>Here's the code I have:
  First I have a normal User model that works just fine creating model and returning name, tlf and other stuff from Firebase. This part is ok.
  Then I have this database service from the Jeff's code:</p>
  
  <pre><code>class DatabaseService {
    final Firestore _db = Firestore.instance;
  
    /// Get a stream of a single document
    Stream&lt;User&gt; streamUser (String id) {
      return _db
          .collection('profiles')
          .document(id)
          .snapshots()
          .map((snap) =&gt; User.fromMap(snap.data));
    }
    }
  </code></pre>
  
  <p>Then I have the screen where I implemented the Provider:</p>
  
  <pre><code>class GestorScreen extends StatelessWidget {
    final db = DatabaseService();
    final FirebaseUser firebaseUser;
    GestorScreen({Key key, @required this.firebaseUser});
  
    @override
    Widget build(BuildContext context) {    
           return StreamProvider&lt;User&gt;.value(
                value: db.streamUser(firebaseUser.uid),
              child: DashboardButtons(),
            );
    }
  }
  </code></pre>
  
  <p>And the DashboardButtons class:</p>
  
  <pre><code>class DashboardButtons extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      var user = Provider.of&lt;User&gt;(context);
      return Scaffold(
        appBar: AppBar(),
        body: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: &lt;Widget&gt;[
                user?.updated != null ? _button(CustomColors.emerald, () {
                  Navigator.push(context,
                      MaterialPageRoute(builder: (context) =&gt;
                          Dashboard(user: user)));
                }, 'Gestionar Perfil') : _button(CustomColors.emerald, () {
                  Navigator.push(context,
                      MaterialPageRoute(builder: (context) =&gt;
                          UserAlta(user: user,)));
                }, ' Dar de Alta (ßeta)'),
                SizedBox(height: SizeConfig.blockSizeHorizontal * 7,),
               .................
               .................
               .................
              ],
            )
  
        ),
        backgroundColor: CustomColors.newCreme,
      )
    }
  }
  </code></pre>
  
  <p>The code works fine but if delete the "?" from user.updated it says that The getter 'updated' was called on null... still it works fine.</p>
  
  <p>Can someone help me with this? Where is the problem with the getter? And did I implemented the Provider the right way?</p>