Relative Content

Tag Archive for flutterfirebase

Flutter Firebase User Document ID & UID is Different

I have a collection “user” and the document id of the user is different from current user’s UID. So when I use FirebaseAuth.instance.currentUser!.uid in the following code it doesn’t work. I am using anonymous login to create users not sure if this makes a difference.

Firebase- adding multiple flutter apps

I need to add another flutter app to my firebase console but I can’t figure out how to. It usually has a “add app” button which leads to options which specify which kind of app you’d like to add. Please refer to the picture, this is what I see. How can I add another app?

Should I add the firebase_options.dart and firebase.json (from Firebase) to my repository?

I added firebase to my Flutter app.
Two configuration files have been added “firebase_options.dart” and “firebase.json”.
Both files contain “apiKey”, “appId”, “messagingSenderId”, “projectId”, etc.
I researched and found older posts in which the google-services.json was still there and it wasn’t really clear whether it should go into the repo or not.
I didn’t find a clear statement anywhere as to whether the firebase.json has to be in the repository or not.

I have a problem with dropdown button in flutter

this error appear after i delete a category however it deletes from firebase:
Exception has occurred.
_AssertionError (‘package:flutter/src/material/dropdown.dart’: Failed assertion: line 948 pos 15: ‘items == null || items.isEmpty || value == null ||
items.where((DropdownMenuItem item) {
return item.value == value;
}).length == 1’: There should be exactly one item with [DropdownButton]’s value: Christmass.
Either zero or 2 or more [DropdownMenuItem]s were detected with the same value)