HashHistory class
A web History that stores the route inside the URL fragment (e.g. /#/about).
This strategy commonly works on static hosts without server-side rewrite
rules, because the browser will only request / from the server.
- Inheritance
-
- Object
- History
- UrlBasedHistory
- HashHistory
Constructors
- HashHistory({String? base, Window? window})
-
Creates a HashHistory that stores the route in
location.hash.
Properties
- action ↔ HistoryAction
-
The last navigation action performed by this history.
getter/setter pairinherited
- base → String
-
The base path applied when creating hrefs.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- index ↔ int?
-
The current index in the history stack, if available.
getter/setter pairinherited
-
listeners
→ List<
HistoryListener> -
finalinherited
- location → HistoryLocation
-
The current location.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → HistoryState?
-
no setterinherited
- window ↔ Window
-
latefinalinherited
Methods
-
back(
) → void -
Equivalent to calling go with
-1.inherited -
createHref(
Uri uri) → String -
Formats a Uri as an href for this history implementation.
override
-
dispose(
) → void -
Releases resources held by the history (e.g. DOM event listeners).
inherited
-
forward(
) → void -
Equivalent to calling go with
+1.inherited -
go(
int delta, {bool triggerListeners = true}) → void -
Moves within the history stack by
deltaentries.inherited -
listen(
HistoryListener listener) → void Function() -
Registers a listener that is called when a
popnavigation completes.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
push(
Uri uri, {Object? state}) → void -
Pushes a new history entry.
inherited
-
replace(
Uri uri, {Object? state}) → void -
Replaces the current history entry.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited