Fix GoRouter initialLocation for web share links
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user