-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[cloud_functions]fixed error introduced by #1210 #1301
Conversation
| CloudFunctions({FirebaseApp app, String region}) | ||
| : _app = app ?? FirebaseApp.instance, | ||
| _region = region; | ||
| _region = region ?? "us-central1"; |
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 feel like defaulting to a certain value behind the scene might be hard to debug for users that does not enable the "us-central1" region in their application. Do google cloud always enable "us-central1"?
Maybe `assert (region != null) is better.
@collinjackson
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 agree, but apparently the Cloud Functions docs say that they run in the us-central1 region by default. Here's the link
|
Thanks for the contribution! I fixed this a different way, see #1316 |
|
help me please: Xcode's output: |
|
@gustavobrian #1316 fixed this issue, there should be a version bump for cloud_functions from 0.1.1+1 to 0.1.2 soon; that should take care of this issue for you! Till then, hold on, or, you could get the bleeding-edge version by editing your cloud_functions entry in your pubspec.yaml file to look like this |
|
i love you!!! |
Fixes flutter/flutter#28578, which was an artifact introduced by #1210 which tried to fix flutter/flutter#27888 and flutter/flutter#24333.
This issue is most likely caused by #1210 as this commit is correlated with the version roll to 0.1.1, which is confirmed by git blame.
Thanks to @aytunch for confirming that the build works with
cloud_functions: 0.1.0+1Performs a null check on the variable, reverting it to the default
us-central1if not found.