# Make sure Flutter is installed
flutter --version
# Get dependencies
flutter pub get- Go to Firebase Console
- Create a new project called "BillSplitter"
- Add an Android app with package name:
com.example.bill_splitter - Download
google-services.jsonand place inandroid/app/
# Install FlutterFire CLI
dart pub global activate flutterfire_cli
# Auto-configure Firebase
flutterfire configureflutter runEnable Google Sign-In:
- Firebase Console → Authentication → Sign-in method → Google → Enable
Set Firestore Rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read, write: if request.auth.uid == userId;
}
match /groups/{groupId} {
allow read: if request.auth.uid in resource.data.members;
allow write: if request.auth.uid == resource.data.createdBy;
match /bills/{billId} {
allow read: if request.auth.uid in get(/databases/$(database)/documents/groups/$(groupId)).data.members;
allow create, delete: if request.auth.uid in get(/databases/$(database)/documents/groups/$(groupId)).data.members;
}
}
}
}
- Sign in with Google on both phones
- Partner A enters Partner B's email → creates group
- Partner B signs in, enters Partner A's email → joins same group
- Start adding bills and watch them sync instantly!
# Run with Hot Reload (for development)
flutter run
# Build APK for installation
flutter build apk
# Release build
flutter build apk --release| Problem | Solution |
|---|---|
| Firebase not initializing | Delete google-services.json and run flutterfire configure again |
| Sign-in fails | Ensure Gmail is enabled on your Google account |
| Bills not syncing | Check internet connection and Firestore Rules |
| Build errors | Run flutter clean && flutter pub get |
For detailed setup and troubleshooting, see README.md