skip to Main Content

Firebase – I'm getting a blank screen instead of firestore data

my main code: import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:day_event_viewer/services/firestore.dart'; import 'package:flutter/material.dart'; class TodayEventScreen extends StatefulWidget { @override _TodayEventScreenState createState() => _TodayEventScreenState(); } class _TodayEventScreenState extends State<TodayEventScreen> { @override Widget build(BuildContext context) { return SafeArea( child: StreamBuilder( stream: getUserDatas(), builder: (BuildContext context, AsyncSnapshot<QuerySnapshot>…

VIEW QUESTION

Firebase – Instance of '_JsonQueryDocumentSnapshot'

main screen code : import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:day_event_viewer/services/firestore.dart'; import 'package:flutter/material.dart'; class TodayEventScreen extends StatefulWidget { @override _TodayEventScreenState createState() => _TodayEventScreenState(); } class _TodayEventScreenState extends State<TodayEventScreen> { @override Widget build(BuildContext context) { return SafeArea( child: StreamBuilder( stream: getUserDatas(), builder: (BuildContext context,…

VIEW QUESTION

Firebase – How do i query a collection of firestore that has so many documents without an error in flutter?

I'm trying to fetch some data from firebase firestore. Below is the code that i used to fecth data Future<List<Candidate>> findCandidateByName(String name) async { final docs = await FirebaseFirestore.instance .collection('candidates') .where('name', isEqualTo: name) .get() .then((snapshot) => snapshot.docs); return docs.map((doc) =>…

VIEW QUESTION
Back To Top
Search