DEV Community

Discussion on: Flutter Web: Firestore CRUD

 
vewapps profile image
VEWapps

I may have used the wrong words. What I meant was to put:

var firebaseConfig = {
apiKey: "",
authDomain: "",
databaseURL: "",
projectId: "",
storageBucket: "",
messagingSenderId: "",
appId: "",
measurementId: ""

};

firebase.initializeApp(firebaseConfig);
firebase.analytics();

in the index.html file instead of putting:

Future main() async {
if (Firebase.apps.isEmpty) {
print(Firebase.apps);
Firebase.initializeApp(
apiKey: '',
authDomain: '',
databaseURL: '',
projectId: '',
storageBucket: '',
messagingSenderId: '',
appId: '',
);
}

in the main.dart file.

Thread Thread
 
vewapps profile image
VEWapps

You know what though? It is working fine for me with the app config stuff in the main.dart file, so I doubt that what I suggested will fix your problem, but maybe you (emailsubjekt) will stumble across it if you keep trying.

Thread Thread
 
happyharis profile image
happyharis

Thanks for helping out VEWapps 😊