flutter_icons 0.3.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 97

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 #

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 #

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(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 #

0.3.1 #

  • File movement and adding assertions

0.3.0 #

  • WeatherIcons added

0.2.5 #

  • IconToggle added

0.2.0 #

  • FontAwesome5_Free added

0.1.5 #

  • Update MaterialCommunityIcons to version 4.0.96

0.1.4 #

  • Add hasIconData method

0.1.3 #

  • Foundation added

0.1.0 #

  • This library contains several icon libraries, including the well-known ant-design icon library, material icon library, and so on


example #

A new Flutter application.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_icons: ^0.3.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_icons/flutter_icons.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Nov 11, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-0.66 points)

86 out of 87 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/src/flutter_icon_data.dart.

Run flutter format to format lib/src/flutter_icon_data.dart.

Format lib/src/icon_toggle.dart.

Run flutter format to format lib/src/icon_toggle.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies