firebase
Installation
SKILL.md
Firebase Setup
- Use
firebase_corefor initialization — callFirebase.initializeApp()beforerunApp() - Use
flutterfire configurefor platform-specific setup - Use separate Firebase projects per flavor (see
app-configskill) - Register Firebase services via
injectablefor consistent DI
Authentication
- Use
firebase_authfor user management - Wrap all auth calls in an
AuthRepository— no directFirebaseAuthusage in BLoCs or UI - Support email/password, Google Sign-In, and Apple Sign-In at minimum
- Handle auth state changes via
FirebaseAuth.instance.authStateChanges()stream inAuthBloc - Store auth tokens via
flutter_secure_storage— never inSharedPreferencesor source code - Implement proper sign-out: clear local cache, navigate to login, dispose user-specific BLoCs