8. Firebase Project Setup (Mobile)
Connect the mobile app to the same Firebase project used by the Admin Panel and User Panel.
8.1. Register the apps
- In the Firebase Console, add an Android app (enter your package name) and/or an iOS app (enter your bundle identifier).
- Download
google-services.json(Android) andGoogleService-Info.plist(iOS).
8.2. Place the config files
- Put
google-services.jsoninandroid/app/. - Put
GoogleService-Info.plistinios/Runner/(via Xcode).
8.3. Install & initialize
Run flutter pub get and make sure Firebase is initialized on startup:
import 'package:firebase_core/firebase_core.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(MyApp());
}