H5WebView class

Inheritance

Constructors

H5WebView({Key? key, String url = "", String htmlData = "", bool isEnabledDebug = false, OnOverloadUrl? overloadingUrl, Map<String, String>? headers, Set<JavascriptChannel>? javascriptChannels, bool withJavascript = true, String? userAgent, bool withZoom = false, bool withDisplayZoomControls = false, Widget? initialChild, OnWebInitializedCallback? initializedCallback, OnWebBack? backListener, bool clearCache = false, bool clearCookies = false, OnSchemeUrl? schemeCall, OnWebLoadFinished? onWebLoadFinished, OnWebPageChanged? onPageChanged, OnTitleCall? onTitleCall, OnWebLoadCompletedCall? loadCompletedCall, bool isLoading = true, String? loadingText, OnUpdateTitleCall? titleCall, bool isOnlyChromeUserAgent = false})

Properties

backListener OnWebBack?
页面返回监听
final
clearCache bool
加载页面时清除缓存
final
clearCookies bool
清除页面cookies
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>?
final
htmlData String
load html data
final
initialChild Widget?
页面渲染完成前初始化视图
final
initializedCallback OnWebInitializedCallback?
页面初始化完成时回调
final
isEnabledDebug bool
是否启用web view调试状态
final
isLoading bool
是否显示loading
final
isOnlyChromeUserAgent bool
final
javascriptChannels Set<JavascriptChannel>?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadCompletedCall OnWebLoadCompletedCall?
页面加载完成(包括资源)
final
loadingText String?
loading text
final
onPageChanged OnWebPageChanged?
页面改变监听
final
onTitleCall OnTitleCall?
web title listener
final
onWebLoadFinished OnWebLoadFinished?
加载已结束
final
overloadingUrl OnOverloadUrl?
url改变监听
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schemeCall OnSchemeUrl?
request scheme url or javascript call scheme
final
titleCall OnUpdateTitleCall?
更新标题回调
final
url String
remote or local url
final
userAgent String?
用户代理
final
withDisplayZoomControls bool
是否显示缩放控件(默认禁止)
final
withJavascript bool
是否启用js交互(默认启用)
final
withZoom bool
是否启用缩放(默认禁用)
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _H5WebViewState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited