Updated [21/08/2020]: cloud_firestore major changes
Now, all Flutter Firebase documentation is in the new link: https://firebase.flutter.dev/d...
For further actions, you may consider blocking this person and/or reporting abuse
Hi, this doesn't work in deploy mode. It works only in test mode, when testing in Android Studio. When you deploy the app to the web so it has a URL everyone can see, all you get is a blank webpage with nothing on it. Please advise how to fix that.
Try inspecting your website and see what's the error. To inspect: right click on the white screen and click inspect. Then go to the tab console and see the error. Don't reply this thread with your errors. If you can't fix the error, go to flutter github issue and create a new issue with your error.
Does it work if you initialize the app in the index.html file instead of the main.dart file? That fixed a similar problem for me in a different app.
When you say initialise, you mean you are on debug mode? I'm not too sure about it, but if you want to debug, it will be tedious process.
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.
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.
Thanks for helping out VEWapps 😊
Hi happyharis,
thanks for this tutorial, this was already very helpful. Would you mind sharing the source code of your tutorial since I was not able to follow every step in the video.
Thanks so much for your help!
Sorry for the late reply! github.com/happyharis/linktree_dem... Hope this helps
You made my day. Now it works! Thank you so much!
Maybe you have an idea how I could additionally get the documentID of the mapped documents?
firestore.collection('names').doc("uid").set({
'text': "gfghghgh",
}).catchError((e) {
print(e);
});
Hi, how can I get a subcollection whith this method?
firestore.collection('names').doc('111').collection('links')
Sorry, I didn't explain it well. In my application I have a list, a list as if it were from your linktree application. Each item in the list has its subcollections, and I want to click on the item to bring up a new screen with subcollections. If I use as you answered here, I will always have the same values as the subcollection
firebase.google.com/docs/firestore... . Hope this helps
Wait. Why not just add the firebase package as a dependency?
The firebase package is only available for flutter web. Firebase core however, can be used for iOs, Android and Web.
But these firestore functions won't run on mobile, will they?
just tried it on mobile iOS simulator, it doesn't work.
Hi, i am not able to see the data in the firebase database, please tell me what i am doing wrong.
Great Haris! Thanks
Anyone else having trouble getting this to work? In Debug mode all Firestore and QuerySnapshot both return an error NoSuchMethodError: The getter 'uri' was called on null.