replaceState static method

void replaceState(
  1. String path, {
  2. String? title,
})

Replace the current history entry with a new URL.

This updates the URL bar without creating a new history entry. Useful when you want to update the URL to reflect current state without adding to the back button history.

Implementation

static void replaceState(String path, {String? title}) {
  if (!Webify.isInitialized) return;
  if (!Webify.instance.platform.isWeb) return;

  _replaceHistoryState(path, title);
}