History class abstract
A minimal browser-like history abstraction used by unrouter.
The contract intentionally mirrors common browser semantics:
- Implementers
Constructors
- History()
-
const
Properties
- action → HistoryAction
-
The last navigation action performed by this history.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
The current index in the history stack.
no setter
- location → RouteInformation
-
The current location, including the optional per-entry RouteInformation.state.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
back(
) → void -
Equivalent to calling go with
-1. -
createHref(
Uri uri) → String -
Formats a Uri as an
hreffor this history implementation. -
dispose(
) → void - Releases resources held by the history (e.g. DOM event listeners).
-
forward(
) → void -
Equivalent to calling go with
+1. -
go(
int delta) → void -
Moves within the history stack by
deltaentries. -
listen(
void listener(HistoryEvent event)) → void Function() -
Registers a listener that is called when a
popnavigation completes. -
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.
-
replace(
Uri uri, [Object? state]) → void - Replaces the current history entry.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited