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

heroicons 封面
套件詳情v0.11.0

heroicons

輕鬆在您的 Flutter 應用中使用 heroicons 圖示集作為 SVG 檔案。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1.8萬
喜歡數
87
Pub 分數
160

安裝套件

flutter pub add heroicons

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

heroicons 套件為 Flutter 應用程式提供了對 Heroicons SVG 圖示集的便捷存取。它讓開發者能夠將大量高品質、可縮放的圖示直接整合到他們的應用程式中,適用於多個平台。圖示以輕量級 SVG 檔案形式提供,確保在所有裝置密度下都能呈現清晰畫質。該套件使用簡單,僅需透過 pub add 即可完成最少設定。支援所有主要平台,包含 Android、iOS、Web、macOS、Windows 與 Linux。

適用情境

  • 向使用者介面添加可縮放圖示
  • 增強應用視覺設計
  • 建構跨平台應用
  • 整合現代圖示美學
  • 建立一致的圖示集

主要特色

  • 基於 SVG 的圖示渲染
  • 跨平台支援
  • 透過 pub 實現輕鬆整合
  • 廣泛的圖標庫
  • 輕量級檔案大小

適合對象

  • UI 設計師
  • Flutter 開發者
  • 跨平台專案
  • 現代應用程式介面
  • 需要可縮放圖標的 App

使用建議

  • 需要 SVG 資產處理
  • 可能稍微增加建構大小
  • 有限的自訂選項
  • 不適用於非SVG工作流程
  • 依賴外部來源程式碼

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

HeroIcons

heroicons port to Flutter. This package renders the icons as SVG images.

This package was last updated to use heroicons version 2.2.0 (on December 15th, 2024). If there's a newer version of HeroIcons available, please create an issue or pull request.

Usage

class MyExampleWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return HeroIcon(
      HeroIcons.calendar,
      style: HeroIconStyle.outline, // Outlined icons are used by default.
      color: Colors.red,
      size: 30,
    );
  }
}

You can also use HeroIconTheme to set the default style (e.g., outline or solid) for all icons in your app. (You'll still be able to override the style for individual icons.)

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      // ...
      home: HeroIconTheme(
        style: HeroIconStyle.solid,
        child: MyHomePage(),
      ),
    );
  }
}

Install

Run flutter pub add heroicons to quickly add latest version from your CLI.

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。