WebViewNotifier class

State notifier that controlls all state for a web view.

Webview implementations must call setController as well as the various notify* calls to update its underlying WebViewState.

In return, this notifier can be used by other widgets to display the webview's title and other data without tight coupling or async issues.

This notifier also holds a pullToRefreshController that can be used by the webview to control its own pull to refresh indicator. This class updates the state of the pull to refresh controller accordingly.

Inheritance

Constructors

WebViewNotifier([WebViewState? state])

Properties

debugState WebViewState
A development-only way to access state outside of StateNotifier.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
If a listener has been added using addListener and hasn't been removed yet.
no setterinherited
mounted bool
Whether dispose was called or not.
no setterinherited
onError ErrorListener?
A callback for error reporting if one of the listeners added with addListener throws.
getter/setter pairinherited
pullToRefreshController PullToRefreshController
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state WebViewState
The current "state" of this StateNotifier.
getter/setter pairinherited
stream Stream<WebViewState>
A broadcast stream representation of a StateNotifier.
no setterinherited

Methods

addListener(Listener<WebViewState> listener, {bool fireImmediately = true}) RemoveListener
Subscribes to this object.
inherited
dispose() → void
Frees all the resources associated with this object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyLoadStart(InAppWebViewController controller, Uri? url) → void
notifyLoadStop(InAppWebViewController controller, Uri? url) → void
notifyPageCommitVisible(InAppWebViewController controller, Uri? url) → void
notifyProgressChanged(InAppWebViewController controller, int progress) → void
notifyReceivedError(InAppWebViewController controller, WebResourceRequest request, WebResourceError error) → void
notifyThemeChanged(ThemeData theme) Future<bool>
notifyTitleChanged(InAppWebViewController controller, String? title) → void
notifyUpdateVisitedHistory(InAppWebViewController controller, Uri? url, bool? androidIsReload) → void
reload() → void
setController(InAppWebViewController controller) → void
toString() String
A string representation of this object.
inherited
updateShouldNotify(WebViewState old, WebViewState current) bool
Whether to notify listeners or not when state changes
override

Operators

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