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.

3.0 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启发而开发

可用的图标

浏览所有.

使用

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

静态方法

Prop Description
getIconData 返回IconData对象供Icon使用,eg : IconData iconData = AntDesign.getIconData("stepforward")
hasIconData 检查是否存在name对应的IconData对象返回布尔值eg: bool isNameValid = AntDesign.hasIconData("stepforward")

示例

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

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));

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