Skip to content

Commit

Permalink
[webview_flutter] Add webview_flutter_tizen package
Browse files Browse the repository at this point in the history
* This PR is created from the PR below:
2bfc038 [webview_flutter] Update README and pubspec (#53)
bdd6a15 [webview_flutter] Enable intergation test (#52)
18da2a6 [webview_flutter] Update code by flutter version-up (#49)
1b6eeed [webview_flutter] Handle CompositionEvent (#47)
791511e [webview_flutter] Optimize tbm allocation (#42)
7059ce2 [webview_flutter] Add cookie and scroll APIs (#40)
c5a8930 Add some APIs (#37)
3feae1d [webview_flutter] Add NavigationDelegate and onWebResourceError (#36)
42b63f8 [webview_flutter] Add removeJavascriptChannels API and Callbacks (#31)
749930e [webview_flutter] Update LWE (#28)
9e26386 [webview_flutter] Implement addJavascriptChannels() (#27)
6a34ae0 [webview_flutter] Update LWE (#26)
a438093 [webview_flutter] Add evaluateJavascript() function (#25)
0d2c271 [webview_flutter] Update webview to be focused (#19)
b02b245 Enable IMF on Webview (#17)
571fa4a [webview_flutter_dev] Change webview interface && embedding lwe.so file (#15)
3413964 [webview_flutter_dev] Enable gl compositor at LWE (#14)
e988cf0 Change method name's first letter (#13)
cb8ee9b Handle key events for tizen webview (#11)
44987de [webview_flutter] Add webview_flutter initial package (#7)

Co-authored-by: MuHong Byun <mh.byun@samsung.com>
Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
  • Loading branch information
bwikbs and seungsoo47 committed Mar 31, 2021
1 parent 6342185 commit fe18993
Show file tree
Hide file tree
Showing 35 changed files with 4,542 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/webview_flutter/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
.dart_tool/

.packages
.pub/

build/
10 changes: 10 additions & 0 deletions packages/webview_flutter/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: 8b3760638a189741cd9ca881aa2dd237c1df1be5
channel: unknown

project_type: plugin
3 changes: 3 additions & 0 deletions packages/webview_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.0.1

* TODO: Describe initial release.
26 changes: 26 additions & 0 deletions packages/webview_flutter/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved.
Copyright (c) 2017 The Chromium 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 names of the copyright holders nor the names of the
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.
52 changes: 52 additions & 0 deletions packages/webview_flutter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# webview_flutter_tizen

The Tizen implementation of [`webview_flutter`](https://github.com/flutter/plugins/tree/master/packages/webview_flutter).

## Supported devices

This plugin is available on these types of devices:

- Galaxy Watch or TV (running Tizen 5.5 or later)

## Usage

```yaml
dependencies:
webview_flutter: ^1.0.6
webview_flutter_tizen: ^1.0.0
```
To enable tizen implementation, set `WebView.platform = TizenWebView();` in `initState()`.
For example:

```dart
import 'dart:io';
import 'package:webview_flutter/webview_flutter.dart';
import 'package:webview_flutter_tizen/webview_flutter_tizen.dart';
class WebViewExample extends StatefulWidget {
@override
WebViewExampleState createState() => WebViewExampleState();
}
class WebViewExampleState extends State<WebViewExample> {
@override
void initState() {
super.initState();
WebView.platform = TizenWebView();
}
@override
Widget build(BuildContext context) {
return WebView(
initialUrl: 'https://flutter.dev',
);
}
}
```

## Limitations
- This plugin is only supported on **Galaxy Watch and TV** devices running Tizen 5.5 or later.
- This is an initial webview plugin for Tizen and is implemented based on Tizen Lightweight Web Engine (LWE). If you would like to know detailed specifications that the LWE supports, please refer to the following link :
https://review.tizen.org/gerrit/gitweb?p=platform/upstream/lightweight-web-engine.git;a=blob;f=docs/Spec.md;h=ecb8f437c5a1facc77d3435e1a8aad6a267f12f3;hb=refs/heads/tizen
41 changes: 41 additions & 0 deletions packages/webview_flutter/example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/

# Web related
lib/generated_plugin_registrant.dart

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json
10 changes: 10 additions & 0 deletions packages/webview_flutter/example/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: 8b3760638a189741cd9ca881aa2dd237c1df1be5
channel: unknown

project_type: app
16 changes: 16 additions & 0 deletions packages/webview_flutter/example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# webview_flutter_tizen_example

Demonstrates how to use the webview_flutter_tizen plugin.

## Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)

For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
Binary file not shown.
Loading

0 comments on commit fe18993

Please sign in to comment.