[url_launcher] Convert macOS to Pigeon#3686
Merged
auto-submit[bot] merged 4 commits intoflutter:mainfrom Apr 12, 2023
Merged
Conversation
Replaces manual method channels with Pigeon. Adjusts the API to return a structured error for the known-failure case of a URL that can't be parsed, instead of returning a `FlutterError`, to prepare for a future conversion of that case into an `ArgumentError` rather than a `PlatformException`; using a strucutred error adds a bit of API complexity, but avoids the need to do a catch/throw-or-rethrow using string matching across the language boundary. Part of flutter/flutter#117915
stuartmorgan-g
commented
Apr 11, 2023
| /// Possible error conditions for [UrlLauncherApi] calls. | ||
| enum UrlLauncherError { | ||
| /// The URL could not be parsed as an NSURL. | ||
| invalidUrl, |
Collaborator
Author
There was a problem hiding this comment.
I did this as an enum even though there's only one value since it was more self-documenting this way, and would easily extend to other error cases if we find more in the future.
5 tasks
Contributor
|
this is just a pigeon change right? not a full conversion to swift? |
tarrinneal
approved these changes
Apr 11, 2023
Collaborator
Author
I have no idea why I wrote Swift in the title; it's already a Swift plugin. |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 12, 2023
nploi
pushed a commit
to nploi/packages
that referenced
this pull request
Jul 16, 2023
[url_launcher] Convert macOS to Pigeon
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replaces manual method channels with Pigeon. Adjusts the API to return a structured error for the known-failure case of a URL that can't be parsed, instead of returning a
FlutterError, to prepare for a future conversion of that case into anArgumentErrorrather than aPlatformException; using a structured error adds a bit of API complexity, but avoids the need to do a catch/throw-or-rethrow using string matching across the language boundary.Part of flutter/flutter#117915
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style.///).