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

插件详情v1.1.0

flutter_icons

适用于 Flutter 的可定制图标,您可以在 Flutter 项目中使用超过 3000 个图标

近 30 天下载
2710
喜欢数
734
Pub 分数
35

安装插件

flutter pub add flutter_icons

插件介绍

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

Flutter Icons 是一个提供超过 3,000 个可自定义图标的包,适用于 Flutter 应用程序。它通过提供丰富的图标集合来增强 UI 设计,可通过简单的 pub 命令轻松集成。该包支持动态缩放、颜色自定义,并能无缝集成到现有的 Flutter 项目中。非常适合希望拥有大量图标而无需依赖外部资源的开发者。源代码在 GitHub 上公开,以确保透明度并促进社区贡献。

适合场景

  • 向应用 UI 添加自定义图标
  • 通过视觉提示增强导航
  • 创建品牌图标集
  • 通过直观的符号改善用户体验
  • 使用图标指标构建仪表板

主要特点

  • 超过3,000个图标
  • 可自定义大小和颜色
  • 通过 pub 实现轻松集成
  • 开源在 GitHub 上
  • 支持多个图标库

适合对象

  • 移动应用开发人员
  • UI/UX 设计师
  • 跨平台项目
  • 需要丰富图标表示的应用程序
  • 设计周期紧张的项目

使用建议

  • 初始设置需要互联网
  • 可能会略微增加应用包大小
  • 限于预定义的图标集
  • 无内置图标搜索
  • 依赖外部仓库的稳定性

原始 README

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

English | 简体中文

flutter_icons

pub package

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

Notice

  1. v1.0.0 has major Api changes, please be careful to upgrade
  2. icon names that begin with a number are preceded by a $prefix
  3. icon named with the dart keyword have the _ suffix added

Bundled Icon Sets

Browse all.

Usage

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

Widget

IconToggle
Prop Description
selectedIconData Icon is displayed when value is true
unselectedIconData Icon is displayed when value is false
activeColor When value is true, the icon color is displayed
inactiveColor When value is false, the icon color is displayed
value Whether this IconToggle is selected.
onChanged Called when the value of the IconToggle should change.
duration The duration of the transition from selected Icon to unselected Icon
reverseDuration he 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_icons/flutter_icons.dart';
import 'package:flutter/material.dart';

// 1.0.0 version used
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)

// After 1.1.0, the FlutterIcons class is provided to access all Icons
// Icon name in the original basis added icon set abbreviation name as suffix
// Hereinafter referred to as the following
//Ant Design Icons -> ant,
//Entypo Icons -> ent,
//Evil Icons -> evi,
//Feather Icons -> fea,
//Font Awesome Icons -> faw,
//Font Awesome 5 Regular -> faw5
//Font Awesome 5 Solid -> faw5s
//Font Awesome 5 Brands -> faw5b
//Foundation Icons -> fou,
//Ionicons Icons -> ion,
//Material Community Icons -> mco,
//Material Icons -> mdi,
//Octicons Icons -> oct,
//Simple Line Icons -> sli,
//Zocial Icons -> zoc,
//Weather Icons -> wea
Icon(FlutterIcons.stepforward_ant)
Icon(FlutterIcons.html5_faw)
...

// Previous versions of 1.0.0 are used
Icon(Ionicons.getIconData("ios-search"));
Icon(AntDesign.getIconData("stepforward"));
Icon(FontAwesome.getIconData("glass"));
Icon(MaterialIcons.getIconData("ac-unit"));
Icon(FontAwesome5.getIconData("address-book"));
Icon(FontAwesome5.getIconData("address-book",weight: IconWeight.Solid));
Icon(FontAwesome5.getIconData("500px", weight: IconWeight.Brand));
How to keep only the fonts used in the project.
step 1

Execute the command

pub global activate split_icon
step2

Add the font you want to leave in the project's pubspec file

//Ant Design Icons -> ant,
//Entypo Icons -> ent,
//Evil Icons -> evi,
//Feather Icons -> fea,
//Font Awesome Icons -> faw,
//Font Awesome 5 Regular -> faw5
//Font Awesome 5 Solid -> faw5s
//Font Awesome 5 Brands -> faw5b
//Foundation Icons -> fou,
//Ionicons Icons -> ion,
//Material Community Icons -> mco,
//Material Icons -> mdi,
//Octicons Icons -> oct,
//Simple Line Icons -> sli,
//Zocial Icons -> zoc,
//Weather Icons -> wea

...

flutter_icons:
  includes:
    -ant 
    -mco
 ...
step3

Execute the command in the project directory

split_icon

所属分类

源码仓库

使用此插件的项目