搜索插件、代码仓与 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 项

源码仓库

使用此插件的项目

暂无相关数据。