title: Flutter: StreamProvider<FirebaseUser> with onAuthStateChanged always returns null as a first value
body: <p>I'm trying to create a simple navigation according to auth state to Firebase, but for some reason 
  <code>Provider.of&lt;FirebaseUser&gt;(context)</code> always returns null as a first value in the widget build method. So my app always navigates to auth screen and after that gets the real user status from Firebase.
  What am I missing here? </p>
  
  <pre><code>Future&lt;void&gt; main() async {
    WidgetsFlutterBinding.ensureInitialized();
    SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
        .then((_) =&gt; runApp(App()));
  }
  
  class App extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return StreamProvider&lt;FirebaseUser&gt;.value(
  //value of user always corresponds to the right auth status
        value: FirebaseAuth.instance.onAuthStateChanged.map((FirebaseUser user) {
          AuthService.instance.user = user;
          return user;
        }),
        child: MaterialApp(
          title: 'Title',
          theme: lightTheme,
          home: LandingScreen(),
        ),
      );
    }
  }
  
  class LandingScreen extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
  //Even though the user is logged in it returns null for the first build() call            
      final user = Provider.of&lt;FirebaseUser&gt;(context);
  
      return AnimatedSwitcher(
        duration: const Duration(milliseconds: 3000),
        transitionBuilder: ...,
        child: user != null ? const MainScreen() : const AuthScreen(),
      );
    }
  }
  </code></pre>