simpleclub/url_strategy
Flutter 앱용 패키지로 단일 줄의 코드로 웹 URL 전략을 설정할 수 있습니다.
- Stars
- 84
- Forks
- 7
- 최근 푸시(UTC)
- 2024. 11. 4.
- 프로젝트 상태
- 보관됨
기술 주제
원본 README
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
README 펼치기 / 접기
url_strategy Pub version
⚠️ Discontinued: The functionality is now provided by the flutter SDK out of the box:
https://docs.flutter.dev/ui/navigation/url-strategies
Package for Flutter apps that allows setting the web URL strategy with a single line of code.
Usage
With a simple call of setPathUrlStrategy, your Flutter web app does not have a leading #
in the URL anymore 🚀
import 'package:url_strategy/url_strategy.dart';
void main() {
// Here we set the URL strategy for our web app.
// It is safe to call this function when running on mobile or desktop as well.
setPathUrlStrategy();
runApp(MyApp());
}
See the url_strategy package README
or the explanation on StackOverflow for more detailed usage documentation.
Implementation
The package is basically a wrapper around the flutter_web_plugins
setUrlStrategy. The reason it exists is that using the function from flutter_web_plugins
requires conditional imports.
The problem is solved by using a conditional export from the url_strategy package.