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_web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.1.0

- Update docs and pubspec.

# 0.0.2

- Switch to using `url_launcher_platform_interface`.
Expand Down
23 changes: 14 additions & 9 deletions packages/url_launcher/url_launcher_web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,27 @@ The web implementation of [`url_launcher`][1].

## Usage

### Import the package
To use this plugin in your Flutter Web app, simply add it as a dependency in
your pubspec using a `git` dependency. This is only temporary: in the future
we hope to make this package an "endorsed" implementation of `url_launcher`,
so that it is automatically included in your Flutter Web app when you depend
on `package:url_launcher`.
your pubspec alongside the base `url_launcher` plugin.

_(This is only temporary: in the future we hope to make this package an
"endorsed" implementation of `url_launcher`, so that it is automatically
included in your Flutter Web app when you depend on `package:url_launcher`.)_

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

```yaml
...
dependencies:
...
url_launcher: ^5.1.4
url_launcher_web:
git:
url: git://github.com/flutter/plugins.git
path: packages/url_launcher/url_launcher_web
url_launcher_web: ^0.1.0
...
```

### Use the plugin
Once you have the `url_launcher_web` dependency in your pubspec, you should
be able to use `package:url_launcher` as normal.

[1]: ../url_launcher
[1]: ../url_launcher/url_launcher
7 changes: 3 additions & 4 deletions packages/url_launcher/url_launcher_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: url_launcher_web
description: Web platform implementation of url_launcher
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/url_launcher/url_launcher_web
version: 0.0.2
version: 0.1.0

flutter:
plugin:
Expand All @@ -12,18 +12,17 @@ flutter:
fileName: url_launcher_web.dart

dependencies:
url_launcher_platform_interface: ^1.0.1
flutter:
sdk: flutter
flutter_web_plugins:
sdk: flutter
meta: ^1.1.7
url_launcher_platform_interface: ^1.0.1

dev_dependencies:
flutter_test:
sdk: flutter
url_launcher:
path: ../url_launcher
url_launcher: ^5.2.5

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does 5.2.5 work with web? The build dashboard had to do a manual set to get it working again (see flutter/cocoon#517)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've looked at the errors that prompted your change, and it seems that you attempted to use this package (too) early on, when it still used Method Channels. The most current implementations of this plugin and url_launcher shouldn't use method channels in the browser, and instead use the platform interface. Please, give this version of the plugin a shot when it gets published!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks David! I opened a PR to update the build dashboard back to using the latest then :)


environment:
sdk: ">=2.0.0-dev.28.0 <3.0.0"
Expand Down