Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[url_launcher] Remove incorrect SMS instructions #7807

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/url_launcher/url_launcher/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 6.3.1

* Removes incorrect SMS instructions from README.
* Updates minimum supported SDK version to Flutter 3.19/Dart 3.3.

## 6.3.0
Expand Down
13 changes: 0 additions & 13 deletions packages/url_launcher/url_launcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,19 +170,6 @@ String? encodeQueryParameters(Map<String, String> params) {
launchUrl(emailLaunchUri);
```

Encoding for `sms` is slightly different:

<?code-excerpt "lib/encoding.dart (sms)"?>
```dart
final Uri smsLaunchUri = Uri(
scheme: 'sms',
path: '0118 999 881 999 119 7253',
queryParameters: <String, String>{
'body': Uri.encodeComponent('Example Subject & Symbols are allowed!'),
},
);
```

### URLs not handled by `Uri`

In rare cases, you may need to launch a URL that the host system considers
Expand Down
18 changes: 0 additions & 18 deletions packages/url_launcher/url_launcher/example/lib/encoding.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ void main() => runApp(
onPressed: _composeMail,
child: Text('Compose an email'),
),
ElevatedButton(
onPressed: _composeSms,
child: Text('Compose a SMS'),
),
],
),
),
Expand All @@ -54,17 +50,3 @@ void _composeMail() {
launchUrl(emailLaunchUri);
// #enddocregion encode-query-parameters
}

void _composeSms() {
// #docregion sms
final Uri smsLaunchUri = Uri(
scheme: 'sms',
path: '0118 999 881 999 119 7253',
queryParameters: <String, String>{
'body': Uri.encodeComponent('Example Subject & Symbols are allowed!'),
},
);
// #enddocregion sms

launchUrl(smsLaunchUri);
}
2 changes: 1 addition & 1 deletion packages/url_launcher/url_launcher/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for launching a URL. Supports
web, phone, SMS, and email schemes.
repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22
version: 6.3.0
version: 6.3.1

environment:
sdk: ^3.3.0
Expand Down