Set URL strategy for web support in main.dart

This commit is contained in:
Leon Bösche
2026-01-25 18:19:20 +01:00
parent d471634f30
commit 0b07522d7c

View File

@@ -16,6 +16,8 @@ import 'pages/public_file_viewer.dart';
import 'theme/app_theme.dart';
import 'injection.dart';
import 'package:flutter/foundation.dart' show kIsWeb;
import 'package:flutter_web_plugins/url_strategy.dart';
final GoRouter _router = GoRouter(
routes: [
@@ -53,6 +55,9 @@ final GoRouter _router = GoRouter(
);
void main() {
if (kIsWeb) {
setUrlStrategy(PathUrlStrategy());
}
runApp(const MainApp());
}