15Adding State Management to the Firestore Client App

WHAT YOU WILL LEARN IN THIS CHAPTER

  • How to use state management to control Firebase Authentication and the Cloud Firestore database
  • How to use the BLoC pattern to separate business logic
  • How to use the InheritedWidget class as a provider to manage and pass state
  • How to implement abstract classes
  • How to use StreamBuilder to receive the latest data from Firebase Authentication and the Cloud Firestore database
  • How to use StreamController, Stream, and Sink to handle Firebase Authentication and Cloud Firestore data events
  • How to create service classes to handle Firebase Authentication and Cloud Firestore API calls with Stream and Future classes
  • How to create a model class for individual journal entries and convert Cloud Firestore QuerySnapshot and map it to the Journal class
  • How to use the optional Firestore Transaction to save data to the Firestore database
  • How to create a class to handle mood icons, descriptions, and rotation
  • How to create a class to handle date formatting
  • How to use the ListView.separated named constructor

In this chapter, you'll continue to edit the mood journaling app created in Chapter 14. For your convenience, you can use the ch14_final_journal project as your starting point and make sure you add your GoogleService‐Info.plist file to the Xcode project and the google‐services.json file to the Android project that you downloaded in Chapter 14 from your Firebase console.

You'll learn how to implement app‐wide ...

Get Beginning Flutter now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.