flutter_vector_icons 0.2.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 94

flutter_vector_icons #

pub

Customizable Icons for Flutter developers. Port of react-native-vector-icons.

View gallery built with Flutter Web: https://pd4d10.github.io/flutter-vector-icons/

Installation #

Add flutter_vector_icons as a dependency in your pubspec.yaml file

Usage #

import 'package:flutter/material.dart';
import 'package:flutter_vector_icons/flutter_vector_icons.dart';

class MyWidget extends StatelessWidget {
  Widget build(BuildContext context) {
    return IconButton(
      // Variable name is the same as font name:
      //
      // AntDesign
      // Entypo
      // EvilIcons
      // Feather
      // FontAwesome
      // Foundation
      // Ionicons
      // MaterialCommunityIcons
      // MaterialIcons
      // Octicons
      // SimpleLineIcons
      // Zocial
      // FontAwesome5Brands
      // FontAwesome5Regular
      // FontAwesome5Solid

      icon: Icon(MaterialCommunityIcons.star),
      onPressed: () {
        print('Star it');
      },
    );
  }
}

Development #

dart tool/generate.dart

Credits #

License #

MIT

0.2.1 #

  • Update fonts from upstream

0.2.0 #

  • Add Font Awesome 5

0.1.0 #

  • Add examples and Changelog following maintenance issues and suggestions

0.0.2 #

  • Add missing fontPackage option

0.0.1 #

  • Initial version

example/flutter_vector_icons_example.dart

import 'package:flutter/material.dart';
import 'package:flutter_vector_icons/flutter_vector_icons.dart';

class MyWidget extends StatelessWidget {
  Widget build(BuildContext context) {
    return IconButton(
      // Variable name is the same as font name:
      //
      // AntDesign
      // Entypo
      // EvilIcons
      // Feather
      // FontAwesome
      // Foundation
      // Ionicons
      // MaterialCommunityIcons
      // MaterialIcons
      // Octicons
      // SimpleLineIcons
      // Zocial
      // FontAwesome5Brands
      // FontAwesome5Regular
      // FontAwesome5Solid

      icon: Icon(MaterialCommunityIcons.star),
      onPressed: () {
        print('Star it');
      },
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_vector_icons: ^0.2.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_vector_icons/flutter_vector_icons.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
93
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
94
Learn more about scoring.

We analyzed this package on Nov 15, 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

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

exitCode: -15 stdout: Exceeded timeout of 0:10:00.000000 parsing /tmp/pub-dartlang-dartdocTKZZZI/pkg/lib/flutter_vector_icons.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/collection/collection.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/developer/developer.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/io/io.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/internal/internal.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/isolate/isolate.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/convert/convert.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/async/async.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/typed_data/typed_data.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/_empty.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/math/math.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/core/core.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/_http/http.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/ui/ui.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/ffi/ffi.dart... parsing /tmp/pub-dartlang-dartdocTKZZZI/pkg/lib/src/ant_design.dart... parsing /flutter/packages/flutter/lib/widgets.dart... parsing /tmp/pub-cache-dirEAMRYT/hosted/pub.dartlang.org/vector_math-2.0.8/lib/vector_math_64.dart... parsing /tmp/pub-cache-dirEAMRYT/hosted/pub.dartlang.org/vector_math-2.0.8/lib/hash.dart... [...] parsing /flutter/packages/flutter/lib/src/material/popup_menu.dart... parsing /flutter/packages/flutter/lib/src/material/radio.dart... parsing /flutter/packages/flutter/lib/src/material/radio_list_tile.dart... parsing /flutter/packages/flutter/lib/src/material/range_slider.dart... parsing /flutter/packages/flutter/lib/src/material/refresh_indicator.dart... parsing /flutter/packages/flutter/lib/src/material/search.dart... parsing /flutter/packages/flutter/lib/src/material/text_field.dart... parsing /flutter/packages/flutter/lib/src/material/selectable_text.dart... parsing /flutter/packages/flutter/lib/src/material/text_selection.dart... parsing /flutter/packages/flutter/lib/src/material/slider.dart... parsing /flutter/packages/flutter/lib/src/material/stepper.dart... parsing /flutter/packages/flutter/lib/src/material/switch.dart... parsing /flutter/packages/flutter/lib/src/material/switch_list_tile.dart... parsing /flutter/packages/flutter/lib/src/material/text_form_field.dart... parsing /flutter/packages/flutter/lib/src/material/time_picker.dart... parsing /flutter/packages/flutter/lib/src/material/toggle_buttons.dart... parsing /flutter/packages/flutter/lib/src/material/user_accounts_drawer_header.dart... Initialized dartdoc with 355 libraries in 296.8 seconds documenting flutter_vector_icons Generating docs for library flutter_vector_icons from package:flutter_vector_icons/flutter_vector_icons.dart... stderr: Exceeded timeout of 0:10:00.000000 Documenting flutter_vector_icons... warning: private API of package:Dart is reexported by libraries in other packages: from E: TypeParameter E.location referred to by collection: (file:///tmp/pub-cache-dirEAMRYT/hosted/pub.dartlang.org/collection-1.14.11/lib/collection.dart:1:1) referred to by dart.pkg.collection.wrappers: (file:///tmp/pub-cache-dirEAMRYT/hosted/pub.dartlang.org/collection-1.14.11/lib/wrappers.dart:7:9) warning: private API of package:Dart is reexported by libraries in other packages: from K: TypeParameter K.location referred to by collection: (file:///tmp/pub-cache-dirEAMRYT/hosted/pub.dartlang.org/collection-1.14.11/lib/collection.dart:1:1) referred to by dart.pkg.collection.wrappers: (file:///tmp/pub-cache-dirEAMRYT/hosted/pub.dartlang.org/collection-1.14.11/lib/wrappers.dart:7:9) warning: private API of package:Dart is reexported by libraries in other packages: from V: TypeParameter V.location referred to by collection: (file:///tmp/pub-cache-dirEAMRYT/hosted/pub.dartlang.org/collection-1.14.11/lib/collection.dart:1:1) referred to by dart.pkg.collection.wrappers: (file:///tmp/pub-cache-dirEAMRYT/hosted/pub.dartlang.org/collection-1.14.11/lib/wrappers.dart:7:9) warning: ambiguous reexport of dart-ui.hashList, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.hashList: ModelFunction hashList.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) Use {@canonicalFor dart:ui.hashList} in the desired library's documentation to resolve the ambiguity and/or override dartdoc's decision, or structure your package so the reexport is less ambiguous. The symbol will still be referenced in all candidates -- this only controls the location where it will be written and which library will be displayed in navigation for the relevant pages. The flag --ambiguous-reexport-scorer-min-confidence allows you to set the threshold at which this warning will appear. warning: ambiguous reexport of dart-ui.hashValues, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.hashValues: ModelFunction hashValues.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.VoidCallback, canonicalization candidates: (cupertino, foundation, material, painting, rendering, scheduler, widgets) -> widgets (confidence 0.000) from dart-ui.VoidCallback: Typedef VoidCallback.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) foundation: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) scheduler: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.AccessibilityFeatures, canonicalization candidates: (rendering, semantics) -> semantics (confidence 0.000) from dart-ui.AccessibilityFeatures: Class AccessibilityFeatures.location rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) semantics: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.FontWeight, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.FontWeight: Class FontWeight.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.Locale, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.Locale: Class Locale.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.Offset, canonicalization candidates: (cupertino, gestures, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.Offset: Class Offset.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) gestures: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.Radius, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.Radius: Class Radius.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.Rect, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.Rect: Class Rect.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.RRect, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.RRect: Class RRect.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.RSTransform, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.RSTransform: Class RSTransform.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.Size, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.Size: Class Size.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.TextBox, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.TextBox: Class TextBox.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.TextDecoration, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.TextDecoration: Class TextDecoration.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.TextPosition, canonicalization candidates: (cupertino, material, painting, rendering, services, widgets) -> widgets (confidence 0.000) from dart-ui.TextPosition: Class TextPosition.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) services: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.AppLifecycleState, canonicalization candidates: (cupertino, material, scheduler, widgets) -> widgets (confidence 0.000) from dart-ui.AppLifecycleState: Enum AppLifecycleState.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) scheduler: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.Brightness, canonicalization candidates: (cupertino, material, services) -> services (confidence 0.000) from dart-ui.Brightness: Enum Brightness.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) services: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.FontStyle, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.FontStyle: Enum FontStyle.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.PlaceholderAlignment, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.PlaceholderAlignment: Enum PlaceholderAlignment.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.TextAffinity, canonicalization candidates: (cupertino, material, painting, rendering, services, widgets) -> widgets (confidence 0.000) from dart-ui.TextAffinity: Enum TextAffinity.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) services: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.TextAlign, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.TextAlign: Enum TextAlign.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.TextBaseline, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.TextBaseline: Enum TextBaseline.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.TextDecorationStyle, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.TextDecorationStyle: Enum TextDecorationStyle.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: ambiguous reexport of dart-ui.TextDirection, canonicalization candidates: (cupertino, material, painting, rendering, widgets) -> widgets (confidence 0.000) from dart-ui.TextDirection: Enum TextDirection.location cupertino: 1.010 - embeds package name (+1.000), name is long (+0.01000) material: 1.010 - embeds package name (+1.000), name is long (+0.01000) painting: 1.010 - embeds package name (+1.000), name is long (+0.01000) rendering: 1.010 - embeds package name (+1.000), name is long (+0.01000) widgets: 1.010 - embeds package name (+1.000), name is long (+0.01000) warning: flutter_vector_icons has no library level documentation comments, from flutter_vector_icons: Library flutter_vector_icons.location warning: no canonical library found for flutter_vector_icons.AntDesign.hashCode, not linking, from flutter_vector_icons.AntDesign.hashCode: Field hashCode.location warning: no canonical library found for flutter_vector_icons.AntDesign.runtimeType, not linking, from flutter_vector_icons.AntDesign.runtimeType: Field runtimeType.location warning: no canonical library found for flutter_vector_icons.AntDesign.noSuchMethod, not linking, from flutter_vector_icons.AntDesign.noSuchMethod: Method noSuchMethod.location warning: no canonical library found for flutter_vector_icons.AntDesign.toString, not linking, from flutter_vector_icons.AntDesign.toString: Method toString.location warning: no canonical library found for flutter_vector_icons.AntDesign.==, not linking, from flutter_vector_icons.AntDesign.==: Operator operator ==.location

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.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
flutter_test