Flutterfire scaffold project intended to minimize the initial time setup of any Flutter + Firebase + Riverpod project. Includes basic features, setup configurations, flutter flavors for environments management, authentication, state management initialization, routing and a couple of standard screens
- Flutter SDK (3.10.5) - https://docs.flutter.dev/development/tools/sdk/releases
- Flutterfire CLI (0.2.7) - https://firebase.flutter.dev/docs/overview
- Android Studio (2021.1) - https://developer.android.com/studio
- Android SDK (33.0.0)
- Xcode (14.3.1) - https://developer.apple.com/xcode/
- VS Code (1.79.2) or similar IDE - https://code.visualstudio.com/
- CocoaPods (1.12.1) - https://cocoapods.org/
-
Setup two Firebase Projects (Dev & Prod) - https://console.firebase.google.com/
-
Enable Authentication: Email and Password, Google and Apple providers
-
Enable Firestore Collection from Firebase console. Basic rule you can implement:
rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { function isLoggedIn() { return request.auth != null; } match /{document=**} { allow read, write: if isLoggedIn(); } } }
-
Run
flutterfire configure
for each of them (it will generate 3 files per environment):- Rename and replace
firebase_options_dev.dart
andfirebase_options_prod.dart
insideapp/lib
- Replace
google-services.json
insideapp/android/app/src/dev
andapp/android/app/src/prod
- Replace
firebase_app_id_file.json
insideapp/ios/Runner/Firebase/Dev
andapp/ios/Runner/Firebase/Dev
- Important: drag and drop the files from XCode, otherwise it won't work
- Rename and replace
- Build injection dependencies
- Run app in debug mode - dev
- Build app in release mode for ios - dev
- Build app in release mode for android - dev
- Run app in debug mode - prod
- Build app in release mode for ios - prod
- Build app in release mode for android - prod