Reusable Font Awesome 7.3 icon-font assets for Flutter, with type-safe constants for every glyph included in every bundled font family.
Add the package from Git:
dependencies:
awesome_icons:
git:
url: https://github.com/stackwares/awesome-icons-flutter.git
ref: mainThen run flutter pub get.
Import the package and select an explicit style-qualified constant:
import 'package:awesome_icons/awesome_icons.dart';
AwesomeIcon(AwesomeIcons.jellyRegularStar);
AwesomeIcon(AwesomeIcons.solidStar);
AwesomeIcon(
AwesomeIcons.duotoneRegularStar,
color: const Color(0xff7c3aed),
secondaryColor: const Color(0xffc4b5fd),
);
AwesomeIcon(AwesomeIcons.sharpDuotoneSolidStar);
AwesomeIcon(AwesomeIcons.slabPressDuoRegularStar);AwesomeIcon draws both layers of every bundled Duo and Duotone face.
A missing secondaryColor uses the primary color at 40% opacity. Use
AwesomeIcon for every bundled family, including brands. Flutter's Icon
widget cannot paint these glyphs.
The style prefix matches AwesomeIconFonts: for example,
jellyRegular, duotoneRegular, sharpDuotoneSolid, and
utilityDuoSemibold. The legacy unqualified names are not available.
For a glyph that is not part of Font Awesome's canonical metadata, pass an explicit codepoint:
const customIcon = AwesomeIconData(
0xf005,
fontFamily: AwesomeIconFonts.jellyRegular400,
);awesome_icons does not construct Flutter IconData. Its fonts ship in
full provided no app or dependency constructs Flutter IconData for
these font families. Even one such reference makes Flutter subset that
whole family to the tracked IconData glyphs, discarding other glyphs
painted by AwesomeIcon. This can break release builds while debug works.
Always use AwesomeIconData with AwesomeIcon for these fonts. If a
third-party component requires Flutter IconData, give it a Material or
Cupertino icon rather than recreating an Awesome Icons codepoint.
Material and Cupertino fonts can still tree-shake normally.
Run the offline check on the exact APK, AAB, or IPA you plan to upload:
python3 /path/to/awesome_icons/tool/verify_release_fonts.py --project /path/to/app /path/to/app.aabThe check resolves awesome_icons from the app's existing
.dart_tool/package_config.json, so path and Git dependencies are checked
against the package actually used by that app. It checks font registrations
and compares every bundled Awesome Icons font byte for byte with its source.
Missing, stripped, or changed fonts cause a nonzero exit code. Fix any
failure before uploading. Flutter bundle directories are also accepted;
a debug bundle check does not verify a release artifact. This tool neither
builds nor uploads anything and uses only the Python standard library.
Run its regression tests with:
python3 -m unittest discover -s /path/to/awesome_icons/tool -p 'test_verify_release_fonts.py'tool/fontawesome-7.3.0-icons.json is the vendored Font Awesome 7.3 metadata.
The generator reads the actual font cmap tables, so it emits a constant only
when the glyph is present in that bundled font.
After changing a font asset or updating the matching metadata, run:
dart run tool/generate_icons.dart
dart format lib tool test
flutter testSome bundled Font Awesome style families are nonstandard. Confirm your Font Awesome license before copying, publishing, or redistributing these assets.