From c7810d4e7e819237bcfc519cf9537c2b77f6d1bc Mon Sep 17 00:00:00 2001 From: Marco Date: Wed, 28 Dec 2022 20:27:38 +0100 Subject: [PATCH] Remove /# from URL when using the web app --- lib/main.dart | 3 +++ pubspec.lock | 2 +- pubspec.yaml | 2 ++ web/favicon.png | Bin 917 -> 1141 bytes web/index.html | 2 +- 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 34e0a50..1beab70 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -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()); } diff --git a/pubspec.lock b/pubspec.lock index 5ed668d..580d0a8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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" diff --git a/pubspec.yaml b/pubspec.yaml index 78cb013..6cb4fb0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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 diff --git a/web/favicon.png b/web/favicon.png index 8aaa46ac1ae21512746f852a42ba87e4165dfdd1..e2e3782748896281ca5cd07eebfea4c138a4832a 100644 GIT binary patch literal 1141 zcmV-*1d98KP)P0g(+o@%v^AcMJXII90z46LkJ}yiloeusg#+>P)O>S zrMNKf^R4xty$?D6x%2xktlI7Uz588jJ@2!gwf25R0Avgd46=py--OpUkzm66hnZL~ zA^55Asy#S3_(LQl|6Ryg@L?JMC$NAen*f{&05m=cz+WOmLqnqEQ;f>-sQ~EIUjV)s z_;nc2(b0juy*-qalyG=>h^eV5JUl#b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6SvuapgMqt>$=j#%eyGrQzr zP{L-3gsMA^$I1&gsBAEL+vxi1*Igl=8#8`5?A-T5=z-sk46WA1IUT)AIZHx1rdUrf zVJrJn<74DDw`j)Ki#gt}mIT-Q`XRa2-jQXQoI%w`nb|XblvzK${ZzlV)m-XcwC(od z71_OEC5Bt9GEXosOXaPTYOia#R4ID2TiU~`zVMl08TV_C%DnU4^+HE>9(CE4D6?Fz oujB08i7adh9xk7*FX66dWH6F5TM;?E2b5PlUHx3vIVCg!0Dx9vYXATM diff --git a/web/index.html b/web/index.html index 662b3b6..4bca956 100644 --- a/web/index.html +++ b/web/index.html @@ -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`. --> - +