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

插件详情v3.0.0

flutter_font_icons

适用于 Flutter 的矢量字体图标,包含来自 react-native-vector-icons 和 WeatherIcons 的所有字体。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
4520
喜欢数
78
Pub 分数
150

安装插件

flutter pub add flutter_font_icons

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个 Flutter 包,提供矢量字体图标,包括来自 react-native-vector-icons 和 WeatherIcons 的所有字体。它使开发者能够轻松地将大量可缩放、高质量的图标集成到他们的跨平台应用中。该包支持 Android、iOS、Web、macOS、Windows 和 Linux,确保在任何设备或操作系统上都能保持一致的图标渲染效果。通过 pub add 命令进行最少的设置,即可简化 Flutter 项目中的图标管理。

适合场景

  • 在移动和网页应用中集成可扩展图标
  • 使用 WeatherIcons 添加天气相关图标
  • 通过跨平台的一致图标设计提升用户界面
  • 用轻量级矢量替代品替换基于图像的图标
  • 在 Flutter 中使用来自 react-native-vector-icons 的熟悉图标集

主要特点

  • 支持所有 react-native-vector-icons 字体
  • 包含天气图标集
  • 跨平台兼容性
  • 轻量级矢量图标
  • 通过 pub add 命令轻松集成

适合对象

  • 需要多种图标集的 Flutter 开发人员
  • 需要跨平台图标的项目
  • 频繁使用UI图标的应用
  • 从 React Native 迁移的开发者
  • 注重性能和可扩展性的团队

使用建议

  • 某些使用场景需要手动配置字体资源
  • 限于预定义的图标集
  • 无动态图标生成
  • 最适合静态图标需求
  • 使用大型图标集可能会略微增加应用包大小

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

flutter_font_icons

English | 简体中文

pub package

Customizable Icons for Flutter, Inspired by react-native-vector-icons

Notice

  1. v3.0.0 has major underlying changes to maintain compatibility with Flutter's IconData and will not work on versions of Futter before 3.22.0.
  2. v2.0.0 has major Api changes, please be careful when upgrading
  3. icon names that begin with a number are preceded by a $prefix
  4. icons named with a dart language keyword have the _ suffix added

Bundled Icon Sets

Browse all.

Usage

To use this plugin, add flutter_font_icons as a dependency in your pubspec.yaml file.

Widget

IconToggle
Prop Description
selectedIcon This icon is displayed when IconToggle is selected
unselectedIcon This icon is displayed when IconToggle is not selected
selectedColor When IconToggle is selected, this icon color is displayed
unselectedColor When IconToggle is not selected, this icon color is displayed
selected Whether this IconToggle is selected.
size The size of the icon.
onChanged Called when the value of the IconToggle should change.
duration The duration of the transition from selected Icon to unselected Icon
reverseDuration The duration of the transition from unselected Icon to selected Icon
transitionBuilder Transition animation function between the selected Icon and the unselected Icon

Example

// Import package
import 'package:flutter/material.dart';
import 'package:flutter_font_icons/flutter_font_icons.dart';

// Include icons with
Icon(AntDesign.stepforward),
Icon(Ionicons.ios_search),
Icon(FontAwesome.glass),
Icon(MaterialIcons.ac_unit),
Icon(FontAwesome5.address_book),
Icon(FontAwesome5Solid.address_book),
Icon(FontAwesome5Brands.$500px),

所属分类

源码仓库

使用此插件的项目