This is the companion app of the Flutter Firebase Compendium with code examples.
The Flutter Firebase Compendium is an article series published on Medium. It explains how to use Firebase services from a Flutter application.
I recommend buying my ebook. It contains a lot more details and will save you many hours of research time to develop your apps quicker.
- ๐น Firebase project setup
- ๐น Firebase Authentication
- ๐น Firebase Cloud Firestore
- ๐น Firebase Cloud Functions
- ๐น Firebase Storage
- ๐น Firebase App Check
- ๐น Firebase Remote Config
- ๐น Firebase Hosting
The code uses Firebase as a backend but the Firebase configuration is not included. You have to add it yourself because there are paid features that might cause costs. Refer to this article above on how to perform the necessary steps in detail.
- Create a Firebase project
- Install Firebase CLI
- Install FlutterFire CLI
- Check out the code
- Execute
firebase login
from the app root folder and log into your created Firebase project - Execute
flutterfire configure
from the app root folder and use your created Firebase project - A file
firebase_options.dart
will be created in yourlib
folder - (Cloud Functions only) Execute
firebase deploy --only functions
to deploy the demo functions - (Storage and Cloud Firestore only) Set security rules for Storage and Firestore
- (App Check only) Register an attestation provider and enforce App Check
- (Remote Config only) Create parameters with conditions for Remote Config
- Run the app
- ๐ก Social sign-in only works on web platform
- ๐ก You need to replace the link on
functions_page.dart
according to your deployed function link! - ๐ก Don't forget to set the security rules for Storage and Firestore!
- ๐ก To get file downloads from Firebase Storage work on the web platform, you need to set specific CORS rules!
- ๐ก The Play Integrity attestation provider is not working at the moment. Use SafetyNet as replacement! => SafetyNet deprecated, supported until June 2024!)
Overview of supported platforms of the used Firebase packages.
โ - supported โ - not supported
Android | iOS | Web | MacOS | Windows | Linux | |
---|---|---|---|---|---|---|
Authentication | โ | โ | โ | โ | โ | โ |
Firestore | โ | โ | โ | โ | โ | โ |
Functions | โ | โ | โ | โ | โ | โ |
Storage | โ | โ | โ | โ | โ | โ |
App Check | โ | โ | โ | โ | โ | โ |
Remote Config | โ | โ | โ | โ | โ | โ |
If you like this repository or my work in general, feel free to support me in any way โค
- You can become a Medium member with my referral link for just $5 a month ๐
- You can buy me a coffee โ
- You can donate via PayPal ๐
- You can check out my freebies and curated lists ๐ฃ
- You can buy my ebook or visit my Gumroad store ๐