Set URL strategy for web support in main.dart
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user