English | 简体中文

flutter_icons

pub package

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

Bundled Icon Sets

Browse all.

Usage

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

Widget

IconToggle

PropDescription
selectedIconDataIcon is displayed when value is true
unselectedIconDataIcon is displayed when value is false
activeColorWhen value is true, the icon color is displayed
inactiveColorWhen value is false, the icon color is displayed
valueWhether this IconToggle is selected.
onChangedCalled when the value of the IconToggle should change.
durationThe duration of the transition from selected Icon to unselected Icon
reverseDurationhe duration of the transition from unselected Icon to selected Icon
transitionBuilderTransition animation function between the selected Icon and the unselected Icon

Static Methods

PropDescription
getIconDataReturns the IconData object,eg : IconData iconData = AntDesign.getIconData("stepforward")
hasIconDataChecks if the name is valid in current icon set.eg: bool isNameValid = AntDesign.hasIconData("stepforward")

IconExplorer

Try to run the example project Or download apk, there you can also search for any icon.

图片名称

Example

// Import package
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));

Special thanks to react native vector ICONS library and its authors

Libraries

ant_design
entypo
evil_icons
feather
flutter_icon_data
flutter_icons
font_awesome
font_awesome_5
foundation
icon_toggle
ionicons
material_community_icons
material_icons
octicons
simple_line_icons
weather_icons
zocial