dynamic_path_url_strategy 1.0.0 copy "dynamic_path_url_strategy: ^1.0.0" to clipboard
dynamic_path_url_strategy: ^1.0.0 copied to clipboard

A Flutter package that provides a clean way to handle URL strategy for web applications, removing the '#' from URLs while maintaining compatibility with non-web platforms

dynamic_path_url_strategy #

A Flutter package that provides a clean way to handle URL strategy for web applications, removing the '#' from URLs while maintaining compatibility with non-web platforms.

Features #

  • Removes the '#' from URLs in web applications
  • No-op on non-web platforms
  • Simple to use
  • Platform-safe implementation

Getting started #

Add this to your package's pubspec.yaml file:

dependencies:
  flutter_url_strategy: ^1.0.0

Usage #

import 'package:dynamic_path_url_strategy/dynamic_path_url_strategy.dart';

void main() {
  setPathUrlStrategy();
  runApp(MyApp());
}

Additional information #

This package uses conditional imports to ensure it works correctly on both web and non-web platforms. On web platforms, it configures the URL strategy to use paths instead of hash URLs. On other platforms, it's a no-op.

License #

MIT License - see LICENSE file for details

3
likes
150
points
1.55k
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that provides a clean way to handle URL strategy for web applications, removing the '#' from URLs while maintaining compatibility with non-web platforms

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_web_plugins

More

Packages that depend on dynamic_path_url_strategy