搜尋套件、儲存庫與 APP 分類

GitHub 儲存庫simpleclub/url_strategy

url_strategy

適用於 Flutter 應用的套件,僅需一行程式碼即可設定 Web URL 策略。

url_strategy 專案封面
星標
84
分支
7
最近推送(UTC)
2024年11月4日
專案狀態
已封存

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

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.

simpleclub GitHub avatar
GitHub 作者

simpleclub ↗

Germany's #1 learning app with 2M+ users. High-quality educational content, powered by state-of-the-art technology.

語言DartHTML

分類

此儲存庫發佈的套件

如何選擇適合專案的儲存庫?

先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。

  1. 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
  2. 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
  3. 使用前在 GitHub 確認 README、授權條款與 Issues。

來源與維護

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗