JsUrlStrategy class Null safety

The JavaScript representation of a URL strategy.

This is used to pass URL strategy implementations across a JS-interop bridge from the app to the engine.

Annotations
  • @JS()
  • @anonymous

Constructors

JsUrlStrategy({@required _PathGetter getPath, @required _StateGetter getState, @required _AddPopStateListener addPopStateListener, @required _StringToString prepareExternalUrl, @required _StateOperation pushState, @required _StateOperation replaceState, @required _HistoryMove go})
Creates an instance of JsUrlStrategy from a bag of URL strategy functions.
factory

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

addPopStateListener(EventListener fn) VoidCallback
Adds a listener to the popstate event and returns a function that removes the listener.
getPath() String
Returns the active path in the browser.
getState() Object
Returns the history state in the browser.
go(int count) Future<void>
Moves forwards or backwards through the history stack.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
prepareExternalUrl(String internalUrl) String
Given a path that's internal to the app, create the external url that will be used in the browser.
pushState(Object? state, String title, String url) → void
Push a new history entry.
replaceState(Object? state, String title, String url) → void
Replace the currently active history entry.
toString() String
A string representation of this object.
inherited

Operators

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