-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[url_launcher] Documentation improvement for file scheme to readme #4711
[url_launcher] Documentation improvement for file scheme to readme #4711
Conversation
@bparrishMines for a quick secondary review. |
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.
LGTM with two last nits.
| `mailto:<email address>?subject=<subject>&body=<body>` | `mailto:[email protected]?subject=News&body=New%20plugin` | Create email to <email address> in the default email app | | ||
| `tel:<phone number>` | `tel:+1-555-010-999` | Make a phone call to <phone number> using the default phone app | | ||
| `sms:<phone number>` | `sms:5550101234` | Send an SMS message to <phone number> using the default messaging app | | ||
| `file:<path>` | `file:/home` | Opens file or folder using default app association, supported on desktop platforms | |
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.
Sorry, one more nit 😐 : This should be "Open" instead of "Opens" to match all of the others.
if (await File(uri.toFilePath()).exists()) { | ||
if (!await launch(uri.toString())) { | ||
throw 'Could not launch $uri'; | ||
} |
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.
And one more: this body is indented 4 instead of 2, making it inconsistent with the inner if's indentation of 2 (and normal Dart practice of indenting 2)
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.
LGTM
Update for documentation on readme file:
Uri
class documentationFixes flutter/flutter#97422
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.