ng_fontawesome 5.7.2+2

Font Awesome for AngularDart #

Basic Usage #

This package provides Font Awesome as an AngularDart component. To use icons inside a component, do the following:

  • Import the package: import 'package:ng_fontawesome/cng_fontawesome.dart';
  • Add the directives to your component: directives: const [FA_DIRECTIVES]
  • Add icons to your template, e.g. <fa name="flag"></fa>

See more usage information in the demo application (source code).

Versioning #

The version number of this package follows the version number of Font Awesome itself. This makes it easy to see which version of Font Awesome is provided by this package and pin your own packages to specific versions of Font Awesome (i.e. a version that adds a specific glyph that your package needs).

Maintenance #

This section is for the developer[s] of this package only.

To upgrade Font Awesome, download and unzip the upstream release. Change into the unzipped directory. Then run these commands:

$ cp css/all.* ../lib/src/css
$ cp webfonts/* ../lib/fonts
$ cd ..
$ sed --in-place 's:url[(]"\.\./web:url("packages/ng_fontawesome/:g' lib/src/css/all.css
$ sed --in-place 's:url[(]\.\./web:url(packages/ng_fontawesome/:g' lib/src/css/all.min.css

To test it out, switch to the ng_fontawesome_demo project and run:

$ pub get
$ webdev serve

To publish:

  1. Put new version in pubspec.yaml
  2. Update
  3. Run dartdoc to make sure it can run successfully
  4. Create and push a git tag
  5. Publish: pub publish

define hyperion gray

The package's version number follows the upstream Font Awesome version number. The build number (after the plus sign) is increased when the package is modified without updating the upstream.

5.7.2+1 #

  • Upgrade to Dart 2.x
  • Upgrade to Angular 5.x
  • Upgrade to Font Awesome 5.7.2

4.7.0+6 #

  • Improve Pub score

4.7.0+5 #

  • Renamed from ng2_fontawesome to ng_fontawesome
  • Upgraded to Angular 4.0.0

Use this package as a library

1. Depend on it

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

  ng_fontawesome: ^5.7.2+2

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or 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:ng_fontawesome/ng_fontawesome.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 Feb 13, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Health suggestions

Fix lib/src/icon.dart. (-3.45 points)

Analysis of lib/src/icon.dart reported 7 hints, including:

line 6 col 16: Avoid const keyword.

line 8 col 17: Avoid const keyword.

line 20 col 34: Avoid const keyword.

line 38 col 35: Avoid const keyword.

line 48 col 33: Avoid const keyword.

Fix lib/src/stack.dart. (-1.99 points)

Analysis of lib/src/stack.dart reported 4 hints:

line 3 col 8: Unused import: 'icon.dart'.

line 8 col 16: Avoid const keyword.

line 10 col 17: Avoid const keyword.

line 17 col 33: Avoid const keyword.

Fix lib/src/list.dart. (-1.49 points)

Analysis of lib/src/list.dart reported 3 hints:

line 9 col 16: Avoid const keyword.

line 49 col 16: Avoid const keyword.

line 52 col 17: Avoid const keyword.

Fix lib/src/directives.dart. (-0.50 points)

Analysis of lib/src/directives.dart reported 1 hint:

line 5 col 45: Avoid const keyword.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and ng_fontawesome.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
angular ^5.2.0 5.3.1 6.0.0-alpha+1
Transitive dependencies
analyzer 0.35.4 0.39.4
angular_ast 0.5.9 0.5.11
angular_compiler 0.4.3 0.4.5
args 1.5.2
async 2.4.0
build 1.2.2
build_config 0.4.2
built_collection 4.3.2
built_value 7.0.9
charcode 1.1.3
checked_yaml 1.0.2
code_builder 3.2.1
collection 1.14.12
convert 2.1.1
crypto 2.1.4
csslib 0.14.6+1 0.16.1
dart_style 1.2.4 1.3.3
fixnum 0.10.11
front_end 0.1.14 0.1.29
glob 1.2.0
intl 0.15.8 0.16.1
js 0.6.1+1
json_annotation 3.0.1
kernel 0.3.14 0.3.29
logging 0.11.4
matcher 0.12.6
meta 1.1.8
node_interop 1.0.3
node_io 1.0.1+2
package_config 1.1.0 2.0.0
path 1.6.4
pedantic 1.9.0
pub_semver 1.4.3
pubspec_parse 0.1.5
quiver 2.1.2+1
source_gen 0.9.4+4 0.9.4+7
source_span 1.6.0
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+13
yaml 2.2.0
Dev dependencies
build_runner ^1.0.0
build_test ^0.10.2
build_web_compilers ^0.4.0