Firebase Integration Flutter Interview Questions
4 questions
How do you implement Firebase Authentication in Flutter?
Add the `firebase_auth` package, initialize Firebase in `main()`, then use `FirebaseAuth.instance` to sign users in (email/password, Google, etc.) and listen to `authStateChanges()` to react to login/logout across the app.
What's the difference between Firestore and the Realtime Database?
Firestore is a newer, document/collection-based database with richer querying, automatic multi-region scaling, and better offline support; the Realtime Database is a simpler single JSON tree, cheaper for very high-frequency small writes but with weaker querying.
How do push notifications work with Firebase Cloud Messaging in Flutter?
The app registers with FCM to get a unique device token, your backend (or Firebase console) sends a message to that token via the FCM API, and the `firebase_messaging` package delivers it to the app in foreground, background, or terminated states via different handlers.
What is Firebase Remote Config used for?
Remote Config lets you change app behavior and appearance — feature flags, A/B test variants, default values — without shipping a new app release, by fetching key/value parameters from the Firebase backend at runtime.