Skip to content

Commit f441bc0

Browse files
authored
[flutter_inappwebview] Introduce flutter_inappwebview_tizen (#1015)
1 parent ff56a9b commit f441bc0

49 files changed

Lines changed: 5839 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/labeler.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
- packages/device_info_plus/**/*
88
"p: firebase_core":
99
- packages/firebase_core/**/*
10+
"p: flutter_inappwebview":
11+
- packages/flutter_inappwebview/**/*
1012
"p: flutter_secure_storage":
1113
- packages/flutter_secure_storage/**/*
1214
"p: flutter_tts":

.github/recipe.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ plugins:
33
connectivity_plus: ["tv-9.0"]
44
device_info_plus: ["tv-9.0"]
55
flutter_secure_storage: ["tv-9.0"]
6+
flutter_inappwebview: ["tv-9.0"]
67
flutter_tts: ["tv-9.0"]
78
integration_test: ["tv-9.0"]
89
messageport: ["tv-9.0"]

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The _"non-endorsed"_ status means that the plugin is not endorsed by the origina
1818
| [**connectivity_plus_tizen**](packages/connectivity_plus) | [connectivity_plus](https://pub.dev/packages/connectivity_plus) (1st-party) | [![pub package](https://img.shields.io/pub/v/connectivity_plus_tizen.svg)](https://pub.dev/packages/connectivity_plus_tizen) | No |
1919
| [**device_info_plus_tizen**](packages/device_info_plus) | [device_info_plus](https://pub.dev/packages/device_info_plus) (1st-party) | [![pub package](https://img.shields.io/pub/v/device_info_plus_tizen.svg)](https://pub.dev/packages/device_info_plus_tizen) | No |
2020
| [**firebase_core_tizen**](packages/firebase_core) | [firebase_core](https://pub.dev/packages/firebase_core) | [![pub package](https://img.shields.io/pub/v/firebase_core_tizen.svg)](https://pub.dev/packages/firebase_core_tizen) | No |
21+
| [**flutter_inappwebview_tizen**](packages/flutter_inappwebview_tizen) | [flutter_inappwebview](https://pub.dev/packages/flutter_inappwebview) | [![pub package](https://img.shields.io/pub/v/flutter_inappwebview_tizen.svg)](https://pub.dev/packages/flutter_inappwebview_tizen) | No |
2122
| [**flutter_secure_storage_tizen**](packages/flutter_secure_storage) | [flutter_secure_storage](https://pub.dev/packages/flutter_secure_storage) (3rd-party) | [![pub package](https://img.shields.io/pub/v/flutter_secure_storage_tizen.svg)](https://pub.dev/packages/flutter_secure_storage_tizen) | No |
2223
| [**flutter_tts_tizen**](packages/flutter_tts) | [flutter_tts](https://pub.dev/packages/flutter_tts) (3rd-party) | [![pub package](https://img.shields.io/pub/v/flutter_tts_tizen.svg)](https://pub.dev/packages/flutter_tts_tizen) | No |
2324
| [**flutter_webrtc_tizen**](packages/flutter_webrtc) | [flutter_webrtc](https://pub.dev/packages/flutter_webrtc) (3rd-party) | [![pub package](https://img.shields.io/pub/v/flutter_webrtc_tizen.svg)](https://pub.dev/packages/flutter_webrtc_tizen) | No |
@@ -58,6 +59,7 @@ The _"non-endorsed"_ status means that the plugin is not endorsed by the origina
5859
| [**connectivity_plus_tizen**](packages/connectivity_plus) | ✔️ | ✔️ | ✔️ | Returns incorrect connection status |
5960
| [**device_info_plus_tizen**](packages/device_info_plus) | ✔️ | ✔️ | ✔️ |
6061
| [**firebase_core**](packages/firebase_core) | ✔️ | ✔️ | ✔️ |
62+
| [**flutter_inappwebview_tizen**](packages/flutter_inappwebview_tizen) | ✔️ | ✔️ | ✔️ |
6163
| [**flutter_secure_storage_tizen**](packages/flutter_secure_storage) | ✔️ | ✔️ | ✔️ |
6264
| [**flutter_tts_tizen**](packages/flutter_tts) | ✔️ | ✔️ | ✔️ |
6365
| [**flutter_webrtc_tizen**](packages/flutter_webrtc) | ✔️ ||| No camera |
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.DS_Store
2+
.dart_tool/
3+
4+
.packages
5+
.pub/
6+
7+
build/
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## 0.1.0
2+
3+
- Initial release of `flutter_inappwebview_tizen`.
4+
-
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright (c) 2026 Samsung Electronics Co., Ltd. All rights reserved.
2+
Copyright (c) 2017 The Chromium Authors. All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification,
5+
are permitted provided that the following conditions are met:
6+
7+
* Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above
10+
copyright notice, this list of conditions and the following
11+
disclaimer in the documentation and/or other materials provided
12+
with the distribution.
13+
* Neither the name of the copyright holder nor the names of the
14+
contributors may be used to endorse or promote products derived
15+
from this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
21+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# flutter_inappwebview_tizen
2+
3+
[![pub package](https://img.shields.io/pub/v/flutter_inappwebview_tizen.svg)](https://pub.dev/packages/flutter_inappwebview_tizen)
4+
5+
The Tizen implementation of [`flutter_inappwebview`](https://pub.dev/packages/flutter_inappwebview).
6+
7+
This package follows the same EWK-backed offscreen rendering approach as
8+
[`webview_flutter_tizen`](https://pub.dev/packages/webview_flutter_tizen) and
9+
maps it onto the `flutter_inappwebview` platform interface. Only the surface
10+
that maps cleanly onto the Tizen WebView (chromium-efl) is implemented; every
11+
other API raises `UnsupportedError` (or the `UnimplementedError` produced by
12+
the `flutter_inappwebview_platform_interface` defaults).
13+
14+
## Required privileges
15+
16+
Add the internet privilege to the app manifest:
17+
18+
```xml
19+
<privileges>
20+
<privilege>http://tizen.org/privilege/internet</privilege>
21+
</privileges>
22+
```
23+
24+
## Usage
25+
26+
```yaml
27+
dependencies:
28+
flutter_inappwebview: ^6.1.5
29+
flutter_inappwebview_tizen:
30+
path: ../flutter_inappwebview_tizen
31+
```
32+
33+
```dart
34+
import 'package:flutter/material.dart';
35+
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
36+
37+
class WebViewExample extends StatelessWidget {
38+
const WebViewExample({super.key});
39+
40+
@override
41+
Widget build(BuildContext context) {
42+
return Scaffold(
43+
body: InAppWebView(
44+
initialUrlRequest: URLRequest(url: WebUri('https://flutter.dev')),
45+
initialSettings: InAppWebViewSettings(
46+
javaScriptEnabled: true,
47+
useShouldOverrideUrlLoading: true,
48+
),
49+
),
50+
);
51+
}
52+
}
53+
```
54+
55+
## Note
56+
57+
- To play Youtube(video player), make app's background color to transparent.
58+
59+
```diff
60+
--- a/packages/flutter_inappwebview/example/lib/in_app_webiew_example.screen.dart
61+
+++ b/packages/flutter_inappwebview/example/lib/in_app_webiew_example.screen.dart
62+
@@ -105,14 +105,13 @@ class _InAppWebViewExampleScreenState extends State<InAppWebViewExampleScreen> {
63+
Widget build(BuildContext context) {
64+
return Scaffold(
65+
appBar: AppBar(title: Text("InAppWebView")),
66+
+ backgroundColor: Colors.transparent,
67+
drawer: myDrawer(context: context),
68+
```
69+
70+
## Supported
71+
72+
- `InAppWebView` platform view
73+
- URL/file/data loading, back/forward/reload/stop, post requests
74+
- JavaScript evaluation
75+
- Navigation interception via `shouldOverrideUrlLoading`
76+
- `onLoadStart`, `onLoadStop`, `onReceivedError`, `onProgressChanged`,
77+
`onTitleChanged`, `onConsoleMessage`, `onScrollChanged`,
78+
`onZoomScaleChanged`, `onUpdateVisitedHistory`, and JavaScript dialog
79+
callbacks (`onJsAlert`, `onJsConfirm`, `onJsPrompt`)
80+
- A subset of `InAppWebViewSettings`: `javaScriptEnabled`, `supportZoom`,
81+
`userAgent`, `transparentBackground`, and `useShouldOverrideUrlLoading`
82+
- `clearCache`, `clearAllCache`, `getDefaultUserAgent`, `handlesURLScheme`
83+
- `CookieManager.deleteAllCookies()`
84+
85+
`InAppWebViewController.getDefaultUserAgent()` returns the EWK user agent that
86+
was captured the first time an `InAppWebView` was created in the process; the
87+
value is cached so it remains available after every webview is disposed.
88+
Calling it before any `InAppWebView` has been created returns an empty string.
89+
90+
## Not supported
91+
92+
The following capabilities are intentionally out of scope and raise
93+
`UnsupportedError`/`UnimplementedError` when invoked:
94+
95+
- `InAppBrowser`, `HeadlessInAppWebView`, `ChromeSafariBrowser`
96+
- `InAppWebViewKeepAlive`, popup `windowId`, context menus, pull-to-refresh
97+
- `FindInteractionController`, `PrintJobController`, `WebMessage*`,
98+
`WebStorage*`, `WebViewEnvironment`, `HttpAuthCredentialDatabase`
99+
- JavaScript handlers/channels and user script injection
100+
- Per-cookie mutation/query APIs (`setCookie`, `getCookie(s)`,
101+
`deleteCookie(s)`)
102+
- Resource interception, custom-scheme loading, downloads, permission and
103+
geolocation prompts, render-process events, fullscreen, capture state,
104+
content-size, and other callbacks not listed above
105+
- Multi-step `goBackOrForward`/`canGoBackOrForward`/`goTo`, `isLoading`,
106+
`getOriginalUrl`, `getSettings`, `reloadFromOrigin`, `pause`/`resume`
107+
- DevTools, simulated requests, screenshot/PDF/web-archive capture, JS/CSS
108+
injection, service worker / proxy / tracing / path-handler controllers
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
include: ../../analysis_options.yaml
2+
3+
analyzer:
4+
language:
5+
strict-casts: false
6+
strict-inference: false
7+
strict-raw-types: false
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
12+
# IntelliJ related
13+
*.iml
14+
*.ipr
15+
*.iws
16+
.idea/
17+
18+
# The .vscode folder contains launch configuration and tasks you configure in
19+
# VS Code which you may wish to be included in version control, so this line
20+
# is commented out by default.
21+
#.vscode/
22+
23+
# Flutter/Dart/Pub related
24+
**/doc/api/
25+
**/ios/Flutter/.last_build_id
26+
.dart_tool/
27+
.flutter-plugins
28+
.flutter-plugins-dependencies
29+
.packages
30+
.pub-cache/
31+
.pub/
32+
/build/
33+
34+
# Web related
35+
lib/generated_plugin_registrant.dart
36+
37+
# Symbolication related
38+
app.*.symbols
39+
40+
# Obfuscation related
41+
app.*.map.json
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# flutter_inappwebview_tizen_example
2+
3+
Demonstrates how to use the flutter_inappwebview_tizen plugin.
4+
5+
## Getting Started
6+
7+
To run this app on your Tizen device, use [flutter-tizen](https://github.com/flutter-tizen/flutter-tizen).

0 commit comments

Comments
 (0)