In my previous guide, we went over a technique to use Cloud Firestore to efficiently generate and maintain large lists of data to be consumed by a client with minimal use of Cloud Firestore read quota. We’ll be expanding on that technique here (using such buzz-words as repository and BLoC), so it will be highly beneficial to give that a read before continuing.

Overview

Most folks these days have likely heard of Flutter and all of the cross-platform benefits that come from choosing it as your UI toolkit. I’m not going to dive into any of those benefits here, as there’s nothing meaningful I could add to the already plentiful ecosystem of posts on the matter. Suffice to say that Flutter is an ideal choice for putting together UI for a mobile application… especially one that intends to use Cloud Firestore as its datastore.

In this guide, we’re going to cover the following:

  • Creating models for our Cloud Firestore data
  • Setting up a data layer to query Cloud Firestore
  • Managing the business logic and state for that data
  • Creating a widget that consumes the state
  • Testing the data, logic, and state layers

#flutter #firebase #cloud #developer

Consuming large Cloud Firestore lists in Flutter
2.40 GEEK