HistoryManager class

Manages browser history entries for Flutter Web.

Provides utilities to manipulate browser history state, which affects the URLs users see and can bookmark.

// Update the URL without navigating
HistoryManager.replaceState('/products/widget-pro', title: 'Widget Pro');

// Push a new history entry
HistoryManager.pushState('/products/new-widget', title: 'New Widget');

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

currentPath → String
Get the current path from the browser
no setter
currentUrl → String
Get the current full URL from the browser
no setter

Static Methods

pushState(String path, {String? title}) → void
Push a new history entry.
replaceState(String path, {String? title}) → void
Replace the current history entry with a new URL.