This repository was archived by the owner on Feb 22, 2023. It is now read-only.
[cloud_firestore,firebase_database,firebase_storage] handling error nil on getFlutterError#1274
Merged
cyanglaz merged 2 commits intoflutter:masterfrom Feb 25, 2019
Merged
Conversation
cyanglaz
suggested changes
Feb 24, 2019
Contributor
cyanglaz
left a comment
There was a problem hiding this comment.
Thank you so much for providing the fix! I have added some comments.
cyanglaz
approved these changes
Feb 25, 2019
This was referenced Feb 25, 2019
|
Amazing! Thanks a lot for the fix. |
romaluca
pushed a commit
to romaluca/plugins
that referenced
this pull request
Mar 6, 2019
… nil on getFlutterError (flutter#1274) When `getFlutterError` was introduced(flutter#1226), some plugins started to throw exceptions for successful operations. This fixed the issue. Related issues include flutter/flutter#28344; flutter/flutter#28065; flutter/flutter#28103 It also fixed an unintentional typo introduced in the same PR.(flutter#1226)
romaluca
pushed a commit
to romaluca/plugins
that referenced
this pull request
Mar 6, 2019
…lutter#1279) This is a similar fix following up flutter#1274
collinjackson
pushed a commit
to collinjackson/flutterfire-old2
that referenced
this pull request
Jun 24, 2019
…#1279) This is a similar fix following up flutter/plugins#1274
collinjackson
pushed a commit
to firebase/flutterfire
that referenced
this pull request
Aug 14, 2019
…1279) This is a similar fix following up flutter/plugins#1274
julianscheel
pushed a commit
to jusst-engineering/plugins
that referenced
this pull request
Mar 11, 2020
… nil on getFlutterError (flutter#1274) When `getFlutterError` was introduced(flutter#1226), some plugins started to throw exceptions for successful operations. This fixed the issue. Related issues include flutter/flutter#28344; flutter/flutter#28065; flutter/flutter#28103 It also fixed an unintentional typo introduced in the same PR.(flutter#1226)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
getFlutterErrorwas introduced, some plugins started to throw exceptions for successful operations. I originally faced that withfirebase_database, but I can see the same happened tocloud_firestore.As you can see in the code, either the caller would have to be changed to check for
error == nilbefore calling it, or we can do it insidegetFlutterErrorand keep the plugin original code.I checked the other plugins, and apparently they don't need the same change as they already do the check or use the
getFlutterErrordifferently.Some of the formatting of the error code was slightly changed and I restored it to what it was, please let me know if that's ok or if that change was intentional.
intends to
fix flutter/flutter#28344
fix flutter/flutter#28065
fix flutter/flutter#28103
cc @collinjackson @kroikie @cyanglaz