The Complete Flutter Course: Build Android, iOS and Web Apps

Cloud Firestore with Flutter

For Flutter learners studying Cloud Firestore, Firebase's document database, this guide selects the reading, writing and security lessons in The Complete Flutter Course: Build Android, iOS and Web Apps. Follow data that persists between visits and keeps screens in step across a portfolio blog and a budget app with per-user records, with clear limits on what is covered.

Taught by Sagnik Bhattacharya and Paulina Knop

The Complete Flutter Course: Build Android, iOS and Web Apps: Sagnik Bhattacharya and Paulina Knop

What you will be able to do

You will be able to:

  • Set up a collection and its documents in the Firebase console, then fetch it with get.
  • Connect a collection stream so database changes appear in the app as they happen.
  • Turn submitted field values into a new document through a function called by the submit button.
  • Define rules for collections that allow additions without reads, or reads without changes.
  • Store signed-in users' expenses and incomes in separate collections for each account, then remove the records to reset.
  • Initialise a Firestore stream once and clear and repopulate its lists when updates arrive.

Projects

What you will build.

The course has nine projects. These two matter most here.

  • Project 04

    Portfolio website and app

    Follow a live blog fed by Firestore articles and a contact form that stores messages with security rules controlling access.

  • Project 08

    Budget app

    Work with account-specific collections whose records appear live, contribute to totals and can be cleared for a reset.

Lessons

The lessons that matter, in course order.

The Complete Flutter Course: Build Android, iOS and Web Apps has 223 lessons. This page picks out 24 of them, 2 h 11 min of video. Each lesson keeps its number in the course.

Where to start

Lesson 127 Introduction to Cloud Firestore

Begin with Lesson 127 after connecting Firebase as shown in Lesson 123. The blog continues the portfolio started at Lesson 47; for the budget's Firestore work, first follow the app build beginning at Lesson 169.

24 of 223 lessons · 2 h 11 min

16 Read data from Firebase using Flutter: Blog Page 6 lessons · 35 min Begin with an articles collection and get for a single read, then explore why the blog needs streams, how snapshots work and how StreamBuilder displays posts on mobile and web.
  1. 127 Start here Introduction to Cloud Firestore Create an articles collection with title and body fields 6 min
  2. 128 Read Firestore data once with get() QuerySnapshot, docs.forEach and a call from initState 5 min
  3. 129 Why the blog needs streams A one-off get() misses new articles; streams push changes 5 min
  4. 130 Stream articles from Firestore Live updates via snapshots(), and title and body for BlogPost 7 min
  5. 131 ListView.builder and StreamBuilder Build posts from a list, then from live Firestore snapshots 6 min
  6. 132 Show Firestore articles on web and mobile Each document's title and body in BlogPost, updating live 5 min
17 Add data to Firestore using Flutter: Contact page: Flutter Portfolio 2 of 6 lessons · 16 min Use addResponse to store contact form submissions in a messages collection, clear the form and display a dialog.
  1. 136 Save contact messages to Firestore An addResponse function that adds to a messages collection 9 min
  2. 137 A submit dialog for every contact form Reset the form and show an AlertDialog from a shared function 7 min
18 Firebase security rules 3 of 4 lessons · 22 min Explore the Rules tab and the time limit on test mode, allow message submissions without reads, protect articles from changes and make the submit dialog report whether saving succeeded.
  1. 139 Introduction to Firestore security rules The Rules tab, test mode's time limit and allow true or false 7 min
  2. 140 Security rules for contact messages A match statement that lets the app write messages, not read 4 min
  3. 141 Article rules and fixing the submit dialog Read-only articles; addResponse now returns true or false 11 min
22 Budget App using Flutter Riverpod and MVVM architecture 1 of 47 lessons · 6 min Restrict access to signed-in users, then follow the expense lists and the loop used to calculate their totals.
  1. 186 A Firestore rule and the totals calculation A signed-in-only rule, then lists and the expense total loop 6 min
22 Budget App using Flutter Riverpod and MVVM architecture 12 of 47 lessons · 52 min Save expenses and incomes for each account, display streamed records with ListView.builder, start the streams once and delete the records when resetting the budget.
  1. 198 A reference to the users collection A CollectionReference so later code stays short 1 min
  2. 199 Saving expenses to Cloud Firestore A per-user expenses collection, error dialog and test entry 7 min
  3. 200 Creating the add income button Check the expense in the Firebase console, then the button 4 min
  4. 201 The add income pop-up A dialog with a form key and controllers for name and amount 4 min
  5. 202 Name and amount fields for income Validated fields, with digits-only amounts on both forms 3 min
  6. 203 Saving income to Cloud Firestore Validate, save to the incomes collection and close the pop-up 5 min
  7. 204 Expenses list box on mobile A heading and a bordered container to hold the expenses 3 min
  8. 205 Showing expenses with ListView.builder Name and amount rows, then the incomes box beside them 6 min
  9. 206 Incomes list and the expenses stream Finish the mobile layout, then listen with snapshots() 4 min
  10. 207 Reading Firestore documents into clean lists Empty the lists on each update to avoid duplicates 4 min
  11. 208 Starting the streams only once An isLoading flag to stay within Firestore's free reads 4 min
  12. 209 Resetting the budget, then the web dashboard Delete every expense and income, then copy logic to the web 6 min

Instructors

Who teaches it.

Paulina Knop smiling, shoulder-length brown hair, wearing a black top.

Instructor, Flutter

Paulina Knop

Flutter developer and curriculum designer. Teaches the Flutter course.

Questions

Asked before starting.

Which course teaches Cloud Firestore in depth for Flutter apps?

The Complete Flutter Course: Build Android, iOS and Web Apps from Coding Liquids teaches Firestore through the portfolio and budget apps. The portfolio reads blog articles once and then streams them, and saves contact form messages. The budget stores each user's expenses and incomes, displays them live and calculates totals, while security rules protect both projects. This guide selects 24 lessons lasting 2 hours 11 minutes. Queries, updates and offline use also require Firebase's documentation.

How does the course arrange Firestore collections and documents for shared and user-specific data?

In The Complete Flutter Course: Build Android, iOS and Web Apps, blog documents contain a title and body within an articles collection, while contact submissions become documents in a messages collection. At Lesson 198, the budget app holds a reference to the users collection. Expenses and incomes are stored under the relevant account, keeping the figures shown to each person specific to them.

How can I store a user's form entries in Firestore?

Use a TextEditingController to read each field, validate the entries with the form's validators and add their values as a document. In The Complete Flutter Course: Build Android, iOS and Web Apps, the contact form's addResponse function saves the message at Lesson 136, followed by clearing the form and showing a confirmation dialog. The budget's expense and income pop-up forms use the same approach.

Does the course explain Firestore security rules?

Yes. At Lesson 139, The Complete Flutter Course: Build Android, iOS and Web Apps introduces the Rules tab and the time limit for test mode. It permits adding contact messages but blocks reading them, allows articles to be read without changes and tests the rules by disabling access. At Lesson 186, the budget app restricts access to signed-in users.

Why use Cloud Firestore instead of the Realtime Database?

Firebase recommends Cloud Firestore for most new apps. Its data is arranged in document collections rather than a large JSON tree, it supports sorting and filtering within a single query, and it scales automatically. Realtime Database remains suitable for simple data needing very low-delay synchronisation. The Complete Flutter Course: Build Android, iOS and Web Apps discusses its reasons for choosing Firestore in the lessons beginning at Lesson 127.

How can I limit Firestore reads to stay within the free tier?

Start a listener once and read when data changes. Each document Firestore returns counts as a read, so restarting a stream during each rebuild multiplies the reads. In The Complete Flutter Course: Build Android, iOS and Web Apps, an isLoading flag starts the budget app's streams only once at Lesson 208. Clearing the lists on updates prevents duplicate entries, as shown at Lesson 207.

Does the course teach document updates, filtered queries or offline data?

No. The Complete Flutter Course: Build Android, iOS and Web Apps covers adding documents, fetching them once, streaming them and deleting the budget's records to reset it. It does not cover changing a document in place, query filtering or pagination, offline operation, transactions or indexes. These topics extend the material taught, and Firebase's Firestore documentation provides Flutter examples for each.

Flutter

See the whole course.

The Complete Flutter Course: Build Android, iOS and Web Apps: 25 hours of video in 223 lessons, built around 9 projects, with lifetime access, a Certificate of Completion and a 14-day money-back guarantee.