This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[webview_flutter] Implementation of the webview_flutter_platform_interface package #4302
Merged
fluttergithubbot
merged 13 commits into
flutter:master
from
Baseflow:webview/federated_architecture_part_2
Sep 9, 2021
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d81d3b0
Setup webview_flutter_platform_interface package.
mvanbeusekom bc79ecd
Direct copy relevant files to platform_interface.
mvanbeusekom 5198072
Added webview_flutter_platform_interface.dart barrel file.
mvanbeusekom e286d50
Separate types from ./lib/platform_interface.dart
mvanbeusekom 16eb3f0
Moved method channel implementation to new folder.
mvanbeusekom 3be55e5
Added tests for the webview_method_channel.dart.
mvanbeusekom 86148f7
Copy `JavascriptChannel` and `JavascriptMessage`.
mvanbeusekom f3d0dd9
Added JavascriptChannelRegistry implementation.
mvanbeusekom a7ece38
Modify existing code to use JavascriptChannelRegistry.
mvanbeusekom 46ae8ae
Fix links in README.
mvanbeusekom e63d6a5
Make sure all files end with an empty line.
mvanbeusekom 94843c3
Format code according to Flutter standards.
mvanbeusekom 9b70390
Merge remote-tracking branch 'upstream/master' into webview/federated…
mvanbeusekom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
packages/webview_flutter/webview_flutter_platform_interface/AUTHORS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Below is a list of people and organizations that have contributed | ||
# to the Flutter project. Names should be added to the list like so: | ||
# | ||
# Name/Organization <email address> | ||
|
||
Google Inc. | ||
The Chromium Authors | ||
German Saprykin <[email protected]> | ||
Benjamin Sauer <[email protected]> | ||
[email protected] | ||
Ali Bitek <[email protected]> | ||
Pol Batlló <[email protected]> | ||
Anatoly Pulyaevskiy | ||
Hayden Flinner <[email protected]> | ||
Stefano Rodriguez <[email protected]> | ||
Salvatore Giordano <[email protected]> | ||
Brian Armstrong <[email protected]> | ||
Paul DeMarco <[email protected]> | ||
Fabricio Nogueira <[email protected]> | ||
Simon Lightfoot <[email protected]> | ||
Ashton Thomas <[email protected]> | ||
Thomas Danner <[email protected]> | ||
Diego Velásquez <[email protected]> | ||
Hajime Nakamura <[email protected]> | ||
Tuyển Vũ Xuân <[email protected]> | ||
Miguel Ruivo <[email protected]> | ||
Sarthak Verma <[email protected]> | ||
Mike Diarmid <[email protected]> | ||
Invertase <[email protected]> | ||
Elliot Hesp <[email protected]> | ||
Vince Varga <[email protected]> | ||
Aawaz Gyawali <[email protected]> | ||
EUI Limited <[email protected]> | ||
Katarina Sheremet <[email protected]> | ||
Thomas Stockx <[email protected]> | ||
Sarbagya Dhaubanjar <[email protected]> | ||
Ozkan Eksi <[email protected]> | ||
Rishab Nayak <[email protected]> | ||
ko2ic <[email protected]> | ||
Jonathan Younger <[email protected]> | ||
Jose Sanchez <[email protected]> | ||
Debkanchan Samadder <[email protected]> | ||
Audrius Karosevicius <[email protected]> | ||
Lukasz Piliszczuk <[email protected]> | ||
SoundReply Solutions GmbH <[email protected]> | ||
Rafal Wachol <[email protected]> | ||
Pau Picas <[email protected]> | ||
Christian Weder <[email protected]> | ||
Alexandru Tuca <[email protected]> | ||
Christian Weder <[email protected]> | ||
Rhodes Davis Jr. <[email protected]> | ||
Luigi Agosti <[email protected]> | ||
Quentin Le Guennec <[email protected]> | ||
Koushik Ravikumar <[email protected]> | ||
Nissim Dsilva <[email protected]> | ||
Giancarlo Rocha <[email protected]> | ||
Ryo Miyake <[email protected]> | ||
Théo Champion <[email protected]> | ||
Kazuki Yamaguchi <[email protected]> | ||
Eitan Schwartz <[email protected]> | ||
Chris Rutkowski <[email protected]> | ||
Juan Alvarez <[email protected]> | ||
Aleksandr Yurkovskiy <[email protected]> | ||
Anton Borries <[email protected]> | ||
Alex Li <[email protected]> | ||
Rahul Raj <[email protected]> | ||
Maurits van Beusekom <[email protected]> |
3 changes: 3 additions & 0 deletions
3
packages/webview_flutter/webview_flutter_platform_interface/CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## 1.0.0 | ||
|
||
* Extracted platform interface from `webview_flutter`. |
25 changes: 25 additions & 0 deletions
25
packages/webview_flutter/webview_flutter_platform_interface/LICENSE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Copyright 2013 The Flutter Authors. All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided | ||
with the distribution. | ||
* Neither the name of Google Inc. nor the names of its | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 changes: 26 additions & 0 deletions
26
packages/webview_flutter/webview_flutter_platform_interface/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# webview_flutter_platform_interface | ||
|
||
A common platform interface for the [`webview_flutter`][1] plugin. | ||
|
||
This interface allows platform-specific implementations of the `webview_flutter` | ||
plugin, as well as the plugin itself, to ensure they are supporting the | ||
same interface. | ||
|
||
# Usage | ||
|
||
To implement a new platform-specific implementation of `webview_flutter`, extend | ||
[`WebviewPlatform`][2] with an implementation that performs the | ||
platform-specific behavior, and when you register your plugin, set the default | ||
`WebviewPlatform` by calling | ||
`WebviewPlatform.setInstance(MyPlatformWebview())`. | ||
|
||
# Note on breaking changes | ||
|
||
Strongly prefer non-breaking changes (such as adding a method to the interface) | ||
over breaking changes for this package. | ||
|
||
See https://flutter.dev/go/platform-interface-breaking-changes for a discussion | ||
on why a less-clean interface is preferable to a breaking change. | ||
|
||
[1]: ../webview_flutter | ||
[2]: lib/webview_flutter_platform_interface.dart |
22 changes: 22 additions & 0 deletions
22
packages/webview_flutter/webview_flutter_platform_interface/pubspec.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: webview_flutter_platform_interface | ||
description: A common platform interface for the webview_flutter plugin. | ||
repository: https://github.com/flutter/plugins/tree/master/packages/webview_flutter/webview_flutter_platform_interface | ||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview_flutter%22 | ||
# NOTE: We strongly prefer non-breaking changes, even at the expense of a | ||
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes | ||
version: 1.0.0 | ||
|
||
environment: | ||
sdk: ">=2.12.0 <3.0.0" | ||
flutter: ">=2.0.0" | ||
|
||
dependencies: | ||
flutter: | ||
sdk: flutter | ||
plugin_platform_interface: ^2.0.0 | ||
|
||
dev_dependencies: | ||
flutter_test: | ||
sdk: flutter | ||
mockito: ^5.0.0 | ||
pedantic: ^1.10.0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This won't work on pub.dev; let's link to
https://pub.dev/packages/webview_flutter
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.
Fixed.