搜索插件、代码仓与 APP 分类

GitHub 代码仓phosphor-icons/flutter

flutter

适用于 Flutter 的灵活图标集

flutter 项目封面
星标
152
复刻
58
最近推送(UTC)
2026年1月6日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

phosphor-flutter

Phosphor is a flexible icon family for interfaces, diagrams, presentations — whatever, really. Explore all our icons at phosphoricons.com.

GitHub stars GitHub forks GitHub watchers Follow on GitHub

ScreenShots

Screenshot Regular Screenshot Thin Screenshot Light Screenshot Bold Screenshot Fill Screenshot Duotone

Installation

Add this to your pubspec.yaml

dependencies:
  phosphor_flutter: ^any

Then run the pub get command

flutter pub get

Usage

PhosphorIcon Widget

The easiest way to use all the Phosphor Icons in your app is to use the PhosphorIcon widget with one of the style-specific icon classes and pass any of our PhosphorIcons to it.

Available Styles:
  • PhosphorIconsRegular
  • PhosphorIconsThin
  • PhosphorIconsLight
  • PhosphorIconsBold
  • PhosphorIconsFill
  • PhosphorIconsDuotone

[!TIP] Use the style classes for smaller font file size. The alternative syntax PhosphorIcons.pencil(PhosphorIconsStyle.fill) is not recommended as it prevents tree shaking.

// import the package
import 'package:phosphor_flutter/phosphor_flutter.dart';

// This will show the [Note Pencil] icon in its fill version
// with a size of 30.0, green color and a semantic label for
// screen readers.
PhosphorIcon(
  PhosphorIconsFill.notePencil,
  color: Colors.green,
  size: 30.0,
  semanticLabel: 'New Note',
),

you could also use the duotone style like this

// import the package
import 'package:phosphor_flutter/phosphor_flutter.dart';

// This will show the [Note Pencil] icon in it's duotone version
PhosphorIcon(
  PhosphorIconsDuotone.notePencil,
  color: Colors.green,
),

by default the secondary color will be the same as the one passed here but with a 20% of opacity, but you can easily override that behavior with the duotoneSecondaryOpacity and duotoneSecondaryColor properties

// import the package
import 'package:phosphor_flutter/phosphor_flutter.dart';

// This will show the [Note Pencil] icon in it's duotone version where the
// foreground color will be green and the background color will be yellow
// with an opacity of 50%
PhosphorIcon(
  PhosphorIconsDuotone.notePencil,
  color: Colors.green,
  duotoneSecondaryOpacity: 0.50,
  duotoneSecondaryColor: Colors.yellow,
),

you can even make the opacity 100% to have a real duocolor icon.

Flutter Icon Widget

You can use the native flutter Icon() widget passing any PhosphorIcon value like any Material Icon

NOTE: Due some limitations with the flutter Icon widget when you pass a duotone icon it will render it as a simple icon, for this case prefer to use our custom PhosphorIcon widget that works the same as Icon but support our duotone style

// With Material Icons
Icon(
  Icons.edit, // Pencil icon
),

// With Phosphor Icons
Icon(
  PhosphorIconsRegular.pencil, // Pencil Icon
),

You could use any property of the Icon widget to personalize the icon.

// This will show the [Note Pencil] icon in it's fill version
// with a size of 30.0, green color and a semantic label for
// screen readers.
Icon(
  PhosphorIconsFill.notePencil,
  color: Colors.green,
  size: 30.0,
  semanticLabel: 'New Note',
),

All the icons has their thin, light, regular, bold and fill versions.

Migration Guide

To migrate from v1.0.0 to 2.1.0 you just need to change all your PhosphorIcons.iconStyle to the new syntax. For example:

// previous
Icon(
  PhosphorIcons.pencilFill, // Pencil Fill Icon
)

// new
Icon(
  PhosphorIconsFill.pencil, // Pencil Fill Icon
)

// new and suggested
PhosphorIcon(
  PhosphorIconsFill.pencil, // Pencil Fill Icon
)

Also, we encourage you to use our new PhosphorIcon widget to have support for duotone icons.

Example App

You could see all the icons within the example app.

Just clone the repository and run the next commands

cd phosphor_flutter/example
flutter pub get
flutter run

Our Projects

Community Projects

If you've made a port of Phosphor and you want to see it here, just open a PR here!

License

MIT © Phosphor Icons

Phosphor Icons GitHub avatar
GitHub 作者

Phosphor Icons ↗

A flexible icon family for everyone

United States of America官方网站 ↗
语言DartC++CMakeHTMLCSwiftKotlinObjective-C

分类

使用的依赖

依赖清单 2 项

  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

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

GitHub Docs — About repositories ↗