Fix GoRouter initialLocation for web share links

This commit is contained in:
Leon Bösche
2026-01-25 16:57:51 +01:00
parent 7a58769139
commit 565b9fed6f

View File

@@ -17,13 +17,9 @@ import 'theme/app_theme.dart';
import 'injection.dart';
import 'package:flutter/foundation.dart' show kIsWeb;
import 'package:web/web.dart' as web;
import 'package:flutter_web_plugins/url_strategy.dart';
final GoRouter _router = GoRouter(
initialLocation: kIsWeb
? web.window.location.pathname + web.window.location.search
: '/',
routes: [
GoRoute(path: '/', builder: (context, state) => const HomePage()),
GoRoute(