Remove /# from URL when using the web app

This commit is contained in:
Marco 2022-12-28 20:27:38 +01:00
parent 330aeed476
commit c7810d4e7e
5 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,9 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
import 'package:mchess/chess/chess_app.dart';
void main() {
if (kIsWeb) setUrlStrategy(PathUrlStrategy());
runApp(const ChessApp());
}

View File

@ -108,7 +108,7 @@ packages:
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"

View File

@ -28,6 +28,8 @@ environment:
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter_web_plugins:
sdk: flutter
flutter_svg:
flutter:
sdk: flutter

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -14,7 +14,7 @@
This is a placeholder for base href that will be replaced by the value of
the `--base-href` argument provided to `flutter build`.
-->
<base href="$FLUTTER_BASE_HREF">
<base href="/">
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">