title: Flutter Widget not updating when notifylisters is called
body: <p>I have a <code>ChangeNotifier</code> that is fetching data correctly from Firebase Firestore. However my StatefulWidget is not updating when this data is loaded. What am I doing wrong over here?</p>
  <pre><code>class MyViewModel with ChangeNotifier {
    MyViewModel();
  
    MyModel _myModel;
    FirebaseRepository _firebaseRepository = FirebaseRepository();
  
    void loadData(String userId) async {
      _myModel =
          await _firebaseRepository.getData(userId);
  
      notifyListeners();
    }
  
    getModelName(){
       return _myModel.name;
    }
  }
  </code></pre>
  <p>and a <code>ChangeNotifierProvider</code> setup at the top level of my widget tree</p>
  <pre><code>void main() =&gt; runApp(MyApp());
  
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MultiProvider(
          providers: [
            ChangeNotifierProvider(
              create: (context) =&gt; MyViewModel(),
            ),
          ],
          child: MaterialApp(
              home: HomeWithBottomNav(title: 'Bottom Nav Home Page'),
              routes: &lt;String, WidgetBuilder&gt;{
                // define the routes
               
                MyPage.routeName: (BuildContext context) =&gt; MyPage(),
                
              }));
    }
  }
  
  </code></pre>
  <p>and a <code>StatefulWidget</code> that is trying to listen to the data</p>
  <pre><code>class MyPage extends StatefulWidget {
    static const String routeName = &quot;/myPage&quot;;
  
    @override
    _State createState() =&gt; _State();
  }
  
  class _State extends State&lt;MyPage&gt; {
    MyViewModel myViewModel =
        new MyViewModel();
  
    @override
    void initState() {
      myViewModel.loadData('userId');
      super.initState();
    }
  
    @override
    Widget build(BuildContext context) {
      Provider.of&lt;MyViewModel&gt;(context);
  
      return Consumer&lt;MyViewModel&gt;(
        builder: (context, myViewModel, child) {
          AppBar appBar = AppBar(
              title: Text(&quot;Model Name: $myViewModel.getModelName()&quot;), // This is not getting the data fetched from firestore
          );
  
          SingleChildScrollView singleChildScrollView = SingleChildScrollView(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.stretch,
              children: &lt;Widget&gt;[],
            ),
          );
  
          Scaffold scaffold =
              Scaffold(appBar: appBar, body: singleChildScrollView);
  
          return scaffold;
        },
      );
    }
  }
  
  
  </code></pre>