Refactor initialLocation formatting in GoRouter for improved readability

This commit is contained in:
Leon Bösche
2026-01-25 00:34:34 +01:00
parent db331ef4ca
commit d482c533d7

View File

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