From 2077c2deb240e099cb6041eb8fb57f02eb70078b Mon Sep 17 00:00:00 2001 From: Sarah Zakarias Date: Fri, 21 Apr 2017 11:13:35 +0200 Subject: [PATCH 1/3] update README --- packages/url-launcher/README.md | 49 +++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/packages/url-launcher/README.md b/packages/url-launcher/README.md index b771a9a19a4a..3dc95f734c42 100644 --- a/packages/url-launcher/README.md +++ b/packages/url-launcher/README.md @@ -1,7 +1,50 @@ # url_launcher -A Flutter plugin for launching a URL. +A Flutter plugin for launching a URL in the mobile platform. Supports iOS and Android. -## Getting Started +## Usage -Try out the plugin by running the project in the example/ folder. +Get this plugin as described [here] (https://www.dartlang.org/tools/pub/get-started). + +### Example + +``` dart +import 'package:flutter/material.dart'; +import 'package:url_launcher/url_launcher.dart'; + +void main() { + runApp(new Scaffold( + body: new Center( + child: new RaisedButton( + onPressed: launchURL, + child: new Text('Show Flutter homepage'), + ), + ), + )); +} + +launchURL() { + UrlLauncher.launch('https://flutter.io'); +} + +``` + + + +## Supported URL schemes + +The supported URL schemes depend on the underlying platform and installed system apps. + +Common schemes supported by both iOS and Android: + +* http: , https: +* mailto: +* tel: +* sms: + +More details can be found here for [iOS](https://developer.apple.com/library/content/featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html) or [Android](https://developer.android.com/guide/components/intents-common.html) + + +## More info + +For more info on Flutter plugins see [this guide](https://flutter.io/platform-plugins/) From 5637b2557710c96679912571b83d2293c4a25d82 Mon Sep 17 00:00:00 2001 From: Sarah Zakarias Date: Fri, 21 Apr 2017 11:15:42 +0200 Subject: [PATCH 2/3] remove empty lines --- packages/url-launcher/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/url-launcher/README.md b/packages/url-launcher/README.md index 3dc95f734c42..9721e385fbba 100644 --- a/packages/url-launcher/README.md +++ b/packages/url-launcher/README.md @@ -29,8 +29,6 @@ launchURL() { ``` - - ## Supported URL schemes The supported URL schemes depend on the underlying platform and installed system apps. From f77111f6830eec23f88dc21913ff3ff53e1538e0 Mon Sep 17 00:00:00 2001 From: Sarah Winther Zakarias Date: Fri, 21 Apr 2017 14:20:35 +0200 Subject: [PATCH 3/3] Address comments --- packages/url-launcher/README.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/url-launcher/README.md b/packages/url-launcher/README.md index 9721e385fbba..57faca9c2c9a 100644 --- a/packages/url-launcher/README.md +++ b/packages/url-launcher/README.md @@ -3,8 +3,7 @@ A Flutter plugin for launching a URL in the mobile platform. Supports iOS and Android. ## Usage - -Get this plugin as described [here] (https://www.dartlang.org/tools/pub/get-started). +To use this plugin, add url_launcher as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/). ### Example @@ -31,7 +30,9 @@ launchURL() { ## Supported URL schemes -The supported URL schemes depend on the underlying platform and installed system apps. +The `launch` method takes a string argument containing a URL. This URL +can be formatted using a number of different URL schemes. The supported +URL schemes depend on the underlying platform and installed apps. Common schemes supported by both iOS and Android: @@ -40,9 +41,5 @@ Common schemes supported by both iOS and Android: * tel: * sms: -More details can be found here for [iOS](https://developer.apple.com/library/content/featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html) or [Android](https://developer.android.com/guide/components/intents-common.html) - - -## More info +More details can be found here for [iOS](https://developer.apple.com/library/content/featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html) and [Android](https://developer.android.com/guide/components/intents-common.html) -For more info on Flutter plugins see [this guide](https://flutter.io/platform-plugins/)