/// Web-specific utilities for browser operations. library; import 'package:web/web.dart' as web; /// Redirect the browser to a URL. void redirectTo(String url) { web.window.location.href = url; } /// Get the current browser URL. String getCurrentUrl() { return web.window.location.href; } /// Replace the current URL in history without navigation. void replaceUrl(String url) { web.window.history.replaceState(null, '', url); }