Enable path-based URL routing for clean share links
This commit is contained in:
@@ -18,6 +18,7 @@ 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
|
||||
@@ -58,6 +59,9 @@ final GoRouter _router = GoRouter(
|
||||
);
|
||||
|
||||
void main() {
|
||||
if (kIsWeb) {
|
||||
setUrlStrategy(PathUrlStrategy());
|
||||
}
|
||||
runApp(const MainApp());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user