InAppWebView class

Inheritance

Constructors

InAppWebView({Key? key, String? url, String? from, bool? showHome = false, Widget? childWidget, required dynamic onError(bool, Object), required dynamic onCancel(String)})
const

Properties

childWidget Widget?
[final Widget? childWidget;[ is declaring an optional instance variable [childWidget[ of type [Widget[. This variable can be used to pass a child widget to the [InAppWebView[ widget, which can be displayed alongside the [WebView[ widget. The [?[ after the type [Widget[ indicates that the variable can be [null[.
final
from String?
[final String? from;[ is declaring an optional instance variable [from[ of type [String[. The [?[ after the type [String[ indicates that the variable can be [null[. This variable can be used to pass a string value to the [InAppWebView[ widget, which can be used to identify the source of the web page being loaded in the [WebView[. It is not being used in the code provided and can be removed if not needed.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onCancel → dynamic Function(String)
[final Function(String) onCancel;[ is declaring an instance variable [onCancel[ of type [Function[ that takes a single argument of type [String[. This variable is passed as a required parameter to the [InAppWebView[ constructor and is used to handle the cancellation of the WebView. When the cancel button is pressed, the [_handleNavigation[ function is called with an empty string as the argument, which in turn calls the [onCancel[ function passed to the constructor with the argument ['Success'[. This allows the parent widget to handle the cancellation event and perform any necessary actions.
final
onError → dynamic Function(bool, Object)
[final Function(bool, Object) onError;[ is declaring an instance variable [onError[ of type [Function[ that takes two parameters: a [bool[ and an [Object[. This variable is used to pass a callback function to the [InAppWebView[ widget that will be called when an error occurs during the loading of a web page in the WebView. The [bool[ parameter indicates whether the error is a network error or not, and the [Object[ parameter contains additional information about the error. The callback function can be used to handle the error in a custom way, such as displaying an error message to the user or logging the error for debugging purposes.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showHome bool?
[final bool? showHome;[ is declaring an optional instance variable [showHome[ of type [bool[. The [?[ after the type [bool[ indicates that the variable can be [null[. This variable can be used to determine whether to show a home page or not in the [InAppWebView[ widget. However, it is not being used in the code provided and can be removed if not needed.
final
url String?
[final String? url;[ is declaring an optional instance variable [url of type [String[. The [?[ after the type [String[ indicates that the variable can be [null[. This variable can be used to pass a URL string to the [InAppWebView[ widget, which can be loaded in the [WebView[. If no URL is provided, the [WebView[ will not load any page.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() InAppWebViewState
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