android 定制webview,webview_flutter

本文介绍了Flutter的WebView插件开发者预览版。该插件在iOS上由WKWebView支持,在Android上由WebView支持。因依赖的嵌入机制处于开发者预览阶段,此插件也属预览版。还提到了已知问题标签、iOS使用设置及WebView键盘支持尚不适用于生产环境等内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

WebView for Flutter (Developers Preview)

webview_flutter.svg

A Flutter plugin that provides a WebView widget.

On iOS the WebView widget is backed by a WKWebView;

On Android the WebView widget is backed by a WebView.

Developers Preview Status

The plugin relies on Flutter's new mechanism for embedding Android and iOS views.

As that mechanism is currently in a developers preview, this plugin should also be

considered a developers preview.

Known issues are tagged with the platform-views and/or webview labels.

To use this plugin on iOS you need to opt-in for the embedded views preview by

adding a boolean property to the app's Info.plist file, with the key io.flutter.embedded_views_preview

and the value YES.

Keyboard support - not ready for production use

Keyboard support within webviews is experimental. The Android version relies on some low-level knobs that have not been well tested

on a broad spectrum of devices yet, and therefore it is not recommended to rely on webview keyboard in production apps yet.

See the webview-keyboard for known issues with keyboard input.

Setup

iOS

Opt-in to the embedded views preview by adding a boolean property to the app's Info.plist file

with the key io.flutter.embedded_views_preview and the value YES.

Usage

You can now include a WebView widget in your widget tree.

See the WebView widget's Dartdoc for more details on how to use the widget.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值