url_strategy library
Classes
- BrowserPlatformLocation
- Delegates to real browser APIs to provide platform location functionality.
- HashUrlStrategy
- Uses the browser URL's hash fragments to represent its state.
- PathUrlStrategy
- Uses the browser URL's pathname to represent Flutter's route name.
- PlatformLocation
- Encapsulates all calls to DOM apis, which allows the UrlStrategy classes to be platform agnostic and testable.
- UrlStrategy
- Represents and reads route state from the browser's URL.
Properties
- urlStrategy → UrlStrategy?
-
Returns the present UrlStrategy for handling the browser URL.
no setter
Functions
-
setUrlStrategy(
UrlStrategy? strategy) → void - Change the strategy to use for handling browser URL.
-
usePathUrlStrategy(
) → void - Use the PathUrlStrategy to handle the browser URL.
Typedefs
- EventListener = dynamic Function(Object event)
- Function type that handles pop state events.
- PopStateListener = void Function(Object? state)
- Callback that receives the new state of the browser history entry.