flutter_inappwebview_tizen
The Tizen implementation of flutter_inappwebview.
This package follows the same offscreen rendering approach as
webview_flutter_tizen and
maps it onto the flutter_inappwebview platform interface. It uses EWK through
Tizen 10.0, WV's EWK-wrapper mode on Tizen 10.1, and WV standalone mode from
Tizen 11.0. The WV modes are experimental. Only the surface that maps cleanly
onto the Tizen WebView (chromium-efl) is implemented; every other API raises
UnsupportedError (or the UnimplementedError produced by the
flutter_inappwebview_platform_interface defaults).
Required privileges
Add the internet privilege to the app manifest:
<privileges>
<privilege>http://tizen.org/privilege/internet</privilege>
</privileges>
Usage
dependencies:
flutter_inappwebview: ^6.1.5
flutter_inappwebview_tizen: ^0.3.0
import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
class WebViewExample extends StatelessWidget {
const WebViewExample({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: InAppWebView(
initialUrlRequest: URLRequest(url: WebUri('https://flutter.cn')),
initialSettings: InAppWebViewSettings(
javaScriptEnabled: true,
useShouldOverrideUrlLoading: true,
),
),
);
}
}
Note
- To play Youtube(video player), make app's background color to transparent.
--- a/packages/flutter_inappwebview/example/lib/in_app_webiew_example.screen.dart
+++ b/packages/flutter_inappwebview/example/lib/in_app_webiew_example.screen.dart
@@ -105,14 +105,13 @@ class _InAppWebViewExampleScreenState extends State<InAppWebViewExampleScreen> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("InAppWebView")),
+ backgroundColor: Colors.transparent,
drawer: myDrawer(context: context),
Supported
InAppWebViewplatform view- URL/file/data loading, back/forward/reload/stop, post requests
- JavaScript evaluation
- Navigation interception via
shouldOverrideUrlLoading onLoadStart,onLoadStop,onReceivedError,onProgressChanged,onTitleChanged,onConsoleMessage,onScrollChanged,onZoomScaleChanged,onUpdateVisitedHistory, and JavaScript dialog callbacks (onJsAlert,onJsConfirm,onJsPrompt)- A subset of
InAppWebViewSettings:javaScriptEnabled,supportZoom,userAgent,transparentBackground, anduseShouldOverrideUrlLoading clearCache,clearAllCache,getDefaultUserAgent,handlesURLSchemeCookieManager.deleteAllCookies()
InAppWebViewController.getDefaultUserAgent() returns the user agent that was
captured the first time an InAppWebView was created in the process; the value
is cached so it remains available after every webview is disposed. Calling it
before any InAppWebView has been created returns an empty string.
Not supported
The following capabilities are intentionally out of scope and raise
UnsupportedError/UnimplementedError when invoked:
InAppBrowser,HeadlessInAppWebView,ChromeSafariBrowserInAppWebViewKeepAlive, popupwindowId, context menus, pull-to-refreshFindInteractionController,PrintJobController,WebMessage*,WebStorage*,WebViewEnvironment,HttpAuthCredentialDatabase- JavaScript handlers/channels and user script injection
- Per-cookie mutation/query APIs (
setCookie,getCookie(s),deleteCookie(s)) - Resource interception, custom-scheme loading, downloads, permission and geolocation prompts, render-process events, fullscreen, capture state, content-size, and other callbacks not listed above
- Multi-step
goBackOrForward/canGoBackOrForward/goTo,isLoading,getOriginalUrl,getSettings,reloadFromOrigin,pause/resume - DevTools, simulated requests, screenshot/PDF/web-archive capture, JS/CSS injection, service worker / proxy / tracing / path-handler controllers