I have a landing page and a collection in firestore that i save some information about a user in (e.g if he passed the On Boarding Screen or not). The next time i open the app, i want to check if the user passed the onboarding. If they did: I redirect to another screen; if not, then redirect to onboarding.
All the examples are reading a collection and get all documents, but i need to read only one document which i know the documentid .
i have tried to get the data like this, but did not work.
class LandingPage extends StatelessWidget { // LandingPage({@required this.auth}); // final AuthBase auth; @override Widget build(BuildContext context) { final auth = Provider.of<AuthBase>(context, listen: false); return StreamBuilder<User>( stream: auth.onAuthStateChanged, builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.active) { User user = snapshot.data; if (user == null) { return ChooseLanguage( // auth: auth, ); } // he i need to do a call to a ducment in the firestore //if the retuen is true then i go to page 1 else go to page 2 } else { return Scaffold( body: Center(child: CircularProgressIndicator()), ); } }, ); } } do i have to do -iama beginner in flutter