skip to Main Content

Firebase – GoogleAuthProvider – Option to choose account

I'm working on a project in Flutter. I use this code: _googleAuthProvider.setCustomParameters({'prompt': 'select_account'}); UserCredential userCredential; if (kIsWeb) { userCredential = await _firebaseAuth.signInWithPopup(_googleAuthProvider); } else { userCredential = await _firebaseAuth.signInWithProvider(_googleAuthProvider); } On web I can choose which account I want to…

VIEW QUESTION

Firebase – Why the snapshot.data.documents can't be accessed while getting messages from Cloud Firestore through StreamBuilder?

The snapshot.data.documents can't be accessed while getting messages from Cloud Firestore through StreamBuilder. Code: class MessagesStream extends StatelessWidget { @override Widget build(BuildContext context) { return StreamBuilder<QuerySnapshot>( stream: _firestore.collection('messages').snapshots(), builder: (context, snapshot) { if (!snapshot.hasData) { return Center( child: CircularProgressIndicator( backgroundColor:…

VIEW QUESTION
Back To Top
Search