-
Notifications
You must be signed in to change notification settings - Fork 9.7k
cloud functions multiple app support #1210
cloud functions multiple app support #1210
Conversation
| FirebaseFunctions.getInstance().getHttpsCallable(functionName); | ||
| Map<String, Object> parameters = call.argument("parameters"); | ||
| String appName = call.argument("app"); | ||
| FirebaseApp app = FirebaseApp.getInstance(appName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if appName is null do we want FirebaseApp.getInstance(), thats for default FirebaseApp as opposed to FirebaseApp.getInstance(null) which might throw? (it's not very clear per docs https://firebase.google.com/docs/reference/android/com/google/firebase/FirebaseApp.html#getInstance(java.lang.String))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think appName cannot be null with the firebase_core plugin that we are depending on. There is an assert(name != null) in firebase_core. The default app is named __FIRAPP_DEFAULT on iOS and [DEFAULT] on Android.
Note that app can't be null either; see the Dart CloudFunctions constructor.

Fixes flutter/flutter#27888