flutter_icons 1.0.0+1

  • Readme
  • Changelog
  • Example
  • Installing
  • 98

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 #

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

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)

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

Special thanks to react native vector ICONS library and its authors #

1.0.0+1 #

  • Enforce code robustness

1.0.0 #

  • Refactored API

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/README.md

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:


dependencies:
  flutter_icons: ^1.0.0+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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
97
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
98
Learn more about scoring.

We analyzed this package on Jan 24, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.2
  • Flutter: 1.12.13+hotfix.5

Health issues and suggestions

Document public APIs. (-0.95 points)

10416 out of 10433 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.

Dependencies

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.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test