title: Map FirebaseUser to custom User object
body: <p>I have a Flutter app in which I'm listening to auth changes from Firebase to display the correct screen, using a StreamProvider. What I would like to do is to map the FirebaseUser to a custom User object, which would be retrieved from Firestore, to have it accessible from anywhere in the widget tree.</p>
  
  <p>Is there any way to achieve this? </p>
  
  <p>What I'm doing right now:</p>
  
  <pre><code>class AuthService {
    final FirebaseAuth _auth = FirebaseAuth.instance;
  
    Stream&lt;FirebaseUser&gt; get user {
      return _auth.onAuthStateChanged;
    }
  }
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return StreamProvider&lt;FirebaseUser&gt;.value(
        value: AuthService().user,
        child: MaterialApp(...)
  </code></pre>