BrowserController class

Controls Browser.

Inheritance

Constructors

BrowserController({String uriString = '', String? userAgent, bool isZoomEnabled = true, WebViewController? webViewController, NavigationDelegate? webViewNavigationDelegate})
Constructs a new browser controller.

Properties

canGoBack bool
Whether goBack may succeed.
no setter
canGoForward bool
Whether goForward may succeed.
no setter
error → WebResourceError?
Returns the current error (if any).
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isLoading bool
Tells whether the controller is loading a page.
no setter
isNavigationEventsReceived bool
Tells whether real navigation events are received.
no setter
isZoomEnabled bool
Determines whether zooming is enabled.
getter/setter pair
onPageFinished Stream<String>
Broadcast stream of page loads that finished.
no setter
onPageStarted Stream<String>
Broadcast stream of page loads that started.
no setter
policy BrowserPolicy?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri Uri
Parsed uriString.
no setter
uriString String
Current URI string.
no setter
userAgent String?
User agent string.
getter/setter pair
webViewController → WebViewController
Web view controller NOT meant to be used developers directly.
no setter
webViewNavigationDelegate → NavigationDelegate?
Optional delegate for listening to navigation events.
final

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
override
goBack({bool fixRedirectIssues = false}) bool
Makes browser go back in the browser history.
goForward() bool
Makes browser go forward in the browser history.
goTo(String uri) → void
Makes browser go to the specified URI.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
refresh() → void
Refreshes the current page.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

globalStateExpiration Duration?
How often BrowserController.clearEverything should be called.
getter/setter pair
resetGlobalStateAtStart bool
Whether BrowserController.clearEverything is called after starting the app.
getter/setter pair

Static Methods

clearEverything() Future<void>
Clears all persistent state, including cookies, caches, and local storage.