You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

English | 简体中文

flutter_icons

pub package

在Flutter中使用可定制的图标该插件包是受到 react-native-vector-icons启发而开发

注意

  1. 1.0.0版本API有很大变化请谨慎升级
  2. Icon名字以数字开头的前面加了$符号
  3. Icon名字为dart关键字的后边加了下划线_

可用的图标

浏览所有.

使用

要使用此插件包,请将flutter_icons作为依赖项添加到您的pubspec.yaml文件中,详见dependency in your pubspec.yaml file.

示例

// 引入包
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter/material.dart';

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)

// 1.1.0之后提供了FlutterIcons类访问所有的图标
// 图标名称在原有的基础上添加了图标集简称名称作为后缀
// 简称如下
//Ant Design Icons -> ant,
//Entypo Icons -> ent,
//Evil Icons -> evi,
//Feather Icons -> fea,
//Font Awesome Icons -> faw,
//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)
...

特别感谢react-native-vector-icons插件包及其开发者们