import 'package:web/web.dart' as web; /// Updates browser URL with query parameters without triggering navigation. /// /// Uses browser's replaceState API to update the URL bar for bookmarking /// without causing Flutter/GoRouter to rebuild the page. void updateBrowserUrlParams(Map params) { final currentUri = Uri.parse(web.window.location.href); final newUri = currentUri.replace( queryParameters: params.isEmpty ? null : params, ); web.window.history.replaceState(null, '', newUri.toString()); }