skip to Main Content

How do I put simple FireBase data into a ListView?

How do I get some FireBase data into a ListView? The following code successfully returns a list of products from FireBase: final CollectionReference _products = FirebaseFirestore.instance.collection('products'); Future<List> getList() async { QuerySnapshot querySnapshot = await _products.get(); final temp = querySnapshot.docs.map((doc) =>…

VIEW QUESTION

New Firebase connection to Flutter application not connecting

I just created a new flutter application and trying to connect a newly made firebase Firestore. Cli has been added and flutterfire config has been ran. import 'package:flutter/material.dart'; import 'package:firebase_core/firebase_core.dart'; import 'firebase_options.dart'; Future<void> main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp( options:…

VIEW QUESTION
Back To Top
Search