CommonWebView class

A reusable WebView widget with customizable handlers and settings

Inheritance

Constructors

CommonWebView({Key? key, URLRequest? initialUrlRequest, String? initialUrl, void onLoadStart(InAppWebViewController, Uri?)?, void onLoadStop(InAppWebViewController, Uri?)?, void onWebViewCreated(InAppWebViewController)?, Future<ServerTrustAuthResponse?> onReceivedServerTrustAuthRequest(InAppWebViewController, URLAuthenticationChallenge)?, Future<NavigationActionPolicy> shouldOverrideUrlLoading(InAppWebViewController, NavigationAction)?, Future<PermissionResponse?> onPermissionRequest(InAppWebViewController, PermissionRequest)?, List<JavaScriptHandlerConfig> javaScriptHandlers = const [], Widget? loadingWidget, Widget? completedWidget, bool showLoading = false, bool showCompleted = false, bool enableUserAgentManagement = true, String? customUserAgentSuffix, bool enableFileDownload = true, bool enablePermissionRequests = false, dynamic onUrlChanged(String)?, dynamic onCanGoBackChanged(bool)?})
const

Properties

completedWidget Widget?
final
customUserAgentSuffix String?
final
enableFileDownload bool
final
enablePermissionRequests bool
final
enableUserAgentManagement bool
final
hashCode int
The hash code for this object.
no setterinherited
initialUrl String?
final
initialUrlRequest → URLRequest?
final
javaScriptHandlers List<JavaScriptHandlerConfig>
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadingWidget Widget?
final
onCanGoBackChanged → dynamic Function(bool)?
final
onLoadStart → void Function(InAppWebViewController, Uri?)?
final
onLoadStop → void Function(InAppWebViewController, Uri?)?
final
onPermissionRequest Future<PermissionResponse?> Function(InAppWebViewController, PermissionRequest)?
final
onReceivedServerTrustAuthRequest Future<ServerTrustAuthResponse?> Function(InAppWebViewController, URLAuthenticationChallenge)?
final
onUrlChanged → dynamic Function(String)?
final
onWebViewCreated → void Function(InAppWebViewController)?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldOverrideUrlLoading Future<NavigationActionPolicy> Function(InAppWebViewController, NavigationAction)?
final
showCompleted bool
final
showLoading bool
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<CommonWebView>
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, int wrapWidth = 65}) 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