Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
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
4 changes: 4 additions & 0 deletions packages/url_launcher/url_launcher/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 5.6.0

* Support Windows by default.

## 5.5.3

* Suppress deprecation warning on the `shouldOverrideUrlLoading` method on Android.
Expand Down
7 changes: 4 additions & 3 deletions packages/url_launcher/url_launcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

[![pub package](https://img.shields.io/pub/v/url_launcher.svg)](https://pub.dartlang.org/packages/url_launcher)

A Flutter plugin for launching a URL in the mobile platform. Supports iOS and Android.
A Flutter plugin for launching a URL in the mobile platform. Supports
iOS, Android, web, Windows, macOS, and Linux.

## Usage
To use this plugin, add `url_launcher` as a [dependency in your pubspec.yaml file](https://flutter.dev/platform-plugins/).
Expand Down Expand Up @@ -91,8 +92,8 @@ web page using a URL following the `http` scheme.

## Browser vs In-app Handling
By default, Android opens up a browser when handling URLs. You can pass
`forceWebView: true` parameter to tell the plugin to open a WebView instead.
If you do this for a URL of a page containing JavaScript, make sure to pass in
`forceWebView: true` parameter to tell the plugin to open a WebView instead.
If you do this for a URL of a page containing JavaScript, make sure to pass in
`enableJavaScript: true`, or else the launch method will not work properly. On
iOS, the default behavior is to open all web URLs within the app. Everything
else is redirected to the app handler.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void main() {
expect(await canLaunch('http://flutter.dev'), true);

// SMS handling is available by default on most platforms.
if (kIsWeb || !Platform.isLinux) {
if (kIsWeb || !(Platform.isLinux || Platform.isWindows)) {
expect(await canLaunch('sms:5555555555'), true);
}

Expand Down
5 changes: 4 additions & 1 deletion packages/url_launcher/url_launcher/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: url_launcher
description: Flutter plugin for launching a URL on Android and iOS. Supports
web, phone, SMS, and email schemes.
homepage: https://github.com/flutter/plugins/tree/master/packages/url_launcher/url_launcher
version: 5.5.3
version: 5.6.0

flutter:
plugin:
Expand All @@ -18,6 +18,8 @@ flutter:
default_package: url_laucher_linux
macos:
default_package: url_laucher_macos
windows:
default_package: url_laucher_windows

dependencies:
flutter:
Expand All @@ -31,6 +33,7 @@ dependencies:
url_launcher_web: ^0.1.3
url_launcher_linux: ^0.0.1
url_launcher_macos: ^0.0.1
url_launcher_windows: ^0.0.1

dev_dependencies:
flutter_test:
Expand Down
4 changes: 4 additions & 0 deletions packages/url_launcher/url_launcher_windows/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.1+1

* Update README to reflect endorsement.

## 0.0.1

* Initial Windows implementation of `url_launcher`.
18 changes: 14 additions & 4 deletions packages/url_launcher/url_launcher_windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,27 @@ For more details see: https://github.com/flutter/flutter/wiki/Package-migration-

### Import the package

This package has not yet been endorsed. Once it is you only need to add
`url_launcher` as a dependency in your `pubspec.yaml`, but for now you
need to include both `url_launcher` and `url_launcher_windows`.
This package has been endorsed, meaning that you only need to add `url_launcher`
as a dependency in your `pubspec.yaml`. It will be automatically included in your app
when you depend on `package:url_launcher`.

This is what the above means to your `pubspec.yaml`:

```yaml
...
dependencies:
...
url_launcher: ^5.5.3
url_launcher: ^5.6.0
...
```

If you wish to use the Windows package only, you can add `url_launcher_windows` as a
dependency:

```yaml
...
dependencies:
...
url_launcher_windows: ^0.0.1
...
```
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
# Run `pod lib lint url_launcher_windows.podspec' to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'url_launcher_windows'
s.version = '0.0.1'
s.summary = 'url_launcher_windows iOS stub'
s.description = <<-DESC
No-op implementation of the windows url_launcher plugin to avoid build issues on iOS
DESC
s.homepage = 'https://github.com/flutter/plugins'
s.license = { :type => 'BSD', :file => '../LICENSE' }
s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
s.source = { :http => 'https://github.com/flutter/plugins/tree/master/packages/url_launcher/url_launcher_windows' }
s.dependency 'Flutter'
s.platform = :ios, '8.0'

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
s.swift_version = '5.0'
end
2 changes: 1 addition & 1 deletion packages/url_launcher/url_launcher_windows/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Windows implementation of the url_launcher plugin.
# 0.0.y+z is compatible with 1.0.0, if you land a breaking change bump
# the version to 2.0.0.
# See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0
version: 0.0.1
version: 0.0.1+1
homepage: https://github.com/flutter/plugins/tree/master/packages/url_launcher/url_launcher_windows

flutter:
Expand Down