Configuring the URL strategy on the web

UI

Navigation and routing

Configuring the URL strategy on the web

Configuring the URL strategy

Configuring your web server

Hosting a Flutter app at a non-root location

Flutter web apps support two ways of configuring
URL-based navigation on the web:

Paths are read and written to the hash fragment.
For example, flutterexample.dev/#/path/to/screen.

Paths are read and written without a hash. For example,
flutterexample.dev/path/to/screen.

Configuring the URL strategy

To configure Flutter to use the path instead, use the
usePathUrlStrategy function provided by the flutter_web_plugins library
in the SDK:

import

'package:flutter_web_plugins/url_strategy.dart'

void

main