0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[Flutter Web][備忘録] URLの 〜/#/ を取り除く方法

Last updated at Posted at 2022-10-03

環境

  • macOS Monterey 11.3.1
  • Flutter 3.3.1
  • Dart 2.18.0

修正は2箇所。

main.dart

+ import 'package:flutter_web_plugins/flutter_web_plugins.dart';

void main() {
  //URLの # を取り除く
+  setUrlStrategy(PathUrlStrategy()); 
  runApp(const MyApp());
}

pubspec.yaml

dependencies:
+   flutter_web_plugins:
+     sdk: flutter
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?