All Projects → fluttercommunity → Font_awesome_flutter

fluttercommunity / Font_awesome_flutter

Licence: other
The Font Awesome Icon pack available as Flutter Icons

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to Font awesome flutter

Laravel Boilerplate
Laravel Boilerplate / Starter Kit with Gentelella Admin Theme
Stars: ✭ 704 (+21.38%)
Mutual labels:  hacktoberfest, font-awesome
Algorithms
A repository of different Algorithms and Data Structures implemented in many programming languages.
Stars: ✭ 578 (-0.34%)
Mutual labels:  hacktoberfest
Vuex Persistedstate
💾 Persist and rehydrate your Vuex state between page reloads.
Stars: ✭ 5,561 (+858.79%)
Mutual labels:  hacktoberfest
Pswinreporting
This PowerShell Module has multiple functionalities, but one of the signature features of this module is the ability to parse Security logs on Domain Controllers providing easy to use access to AD Events.
Stars: ✭ 575 (-0.86%)
Mutual labels:  hacktoberfest
Webpacker
Use Webpack to manage app-like JavaScript modules in Rails
Stars: ✭ 5,282 (+810.69%)
Mutual labels:  hacktoberfest
Hexapod Robot Simulator
A hexapod robot simulator built from first principles
Stars: ✭ 577 (-0.52%)
Mutual labels:  hacktoberfest
Vetur
Vue tooling for VS Code.
Stars: ✭ 5,421 (+834.66%)
Mutual labels:  hacktoberfest
Site
pythondiscord.com - A Django and Bulma web application.
Stars: ✭ 580 (+0%)
Mutual labels:  hacktoberfest
Imgcat
It's like cat, but for images.
Stars: ✭ 577 (-0.52%)
Mutual labels:  hacktoberfest
Malsync
Integrates MyAnimeList/AniList/Kitsu/Simkl into various sites, with auto episode tracking.
Stars: ✭ 572 (-1.38%)
Mutual labels:  hacktoberfest
Undercover
Actionable code coverage - detects untested code blocks in recent changes
Stars: ✭ 574 (-1.03%)
Mutual labels:  hacktoberfest
Cucumber Ruby
Cucumber for Ruby. It's amazing!
Stars: ✭ 5,090 (+777.59%)
Mutual labels:  hacktoberfest
Telegram History Dump
Backup Telegram chat logs using telegram-cli
Stars: ✭ 574 (-1.03%)
Mutual labels:  hacktoberfest
Go
Algorithms Implemented in GoLang
Stars: ✭ 7,385 (+1173.28%)
Mutual labels:  hacktoberfest
Laravel Telescope Toolbar
A toolbar for Laravel Telescope, based on the Symfony Web Profiler.
Stars: ✭ 578 (-0.34%)
Mutual labels:  hacktoberfest
Oh My Posh2
A theme engine for Powershell inspired by the work done by Chris Benti on PS-Config and Oh-My-ZSH on OSX and Linux (hence the name).
Stars: ✭ 5,046 (+770%)
Mutual labels:  hacktoberfest
React Foundation
Foundation as React components.
Stars: ✭ 573 (-1.21%)
Mutual labels:  hacktoberfest
Rmagick
Ruby bindings for ImageMagick
Stars: ✭ 576 (-0.69%)
Mutual labels:  hacktoberfest
Angular Auth Oidc Client
npm package for OpenID Connect, OAuth Code Flow with PKCE, Refresh tokens, Implicit Flow
Stars: ✭ 577 (-0.52%)
Mutual labels:  hacktoberfest
Sunpy
SunPy - Python for Solar Physics
Stars: ✭ 577 (-0.52%)
Mutual labels:  hacktoberfest

font_awesome_flutter

Flutter Community: font_awesome_flutter

Pub

The Font Awesome Icon pack available as set of Flutter Icons.

Based on Font Awesome 5.15.2. Includes all free icons:

  • Regular
  • Solid
  • Brands

Installation

In the dependencies: section of your pubspec.yaml, add the following line:

dependencies:
  font_awesome_flutter: <latest_version>

Usage

import 'package:font_awesome_flutter/font_awesome_flutter.dart';

class MyWidget extends StatelessWidget {
  Widget build(BuildContext context) {
    return IconButton(
      // Use the FaIcon Widget + FontAwesomeIcons class for the IconData
      icon: FaIcon(FontAwesomeIcons.gamepad), 
      onPressed: () { print("Pressed"); }
     );
  }
}

Icon names

Icon names equal those on the official website, but are written in lower camel case. If more than one icon style is available for an icon, the style name is used as prefix, except for "regular". Due to restrictions in dart, icons starting with numbers have those numbers written out.

Examples:

Icon name Code Style
angle-double-up FontAwesomeIcons.angleDoubleUp solid (this icon does not have other free styles)
arrow-alt-circle-up FontAwesomeIcons.arrowAltCircleUp regular
arrow-alt-circle-up FontAwesomeIcons.solidArrowAltCircleUp solid
1 FontAwesomeIcons.solidOne solid

Example App

View the Flutter app in the example directory to see all the available FontAwesomeIcons.

FAQ

Why aren't the icons aligned properly or why are the icons being cut off?

Please use the FaIcon widget provided by the library instead of the Icon widget provided by Flutter. The Icon widget assumes all icons are square, but many Font Awesome Icons are not.

What about file size

This package has been written in a way so that it only uses the minimum amount of ressources required.

All links (eg. FontAwesomeIcons.abacus) to unused icons will be removed automatically, which means only required icon definitions are loaded into ram.

Flutter 1.22 added icon tree shaking. This means unused icon "images" will be removed as well. However, this only applies to styles of which at least one icon has been used. Assuming only icons of style "regular" are being used, "regular" will be minified and "solid" and "brands" will stay in their raw, complete form. This issue is being tracked over in the flutter repository. While it is open, a workaround is to create an icon of each style and put it in an invisible container.

Why aren't the icons showing up on Mobile devices?

If you're not seeing any icons at all, sometimes it means that Flutter has a cached version of the app on device and hasn't pushed the new fonts. I've run into that as well a few times...

Please try:

  1. Stopping the app
  2. Running flutter clean in your app directory
  3. Deleting the app from your simulator / emulator / device
  4. Rebuild & Deploy the app.

Why aren't the icons showing up on Web?

Most likely, the fonts were not correctly added to the FontManifest.json. Note: older versions of Flutter did not properly package non-Material fonts in the FontManifest.json during the build step, but that issue has been resolved and this shouldn't be much of a problem these days.

Please ensure you are using Flutter 1.14.6 beta or newer!

How can I use pro icons?

This library only packages the free Font Awesome icon fonts. If you own the pro icon fonts and want to use them with Flutter, please follow these instructions.

❗️ By importing pro icons you acknowledge that it is your obligation to keep these files private. This includes not uploading your package to a public github repository or other public file sharing services.

  • Download this package's newest release, extract the folder, move it to a location of your choice and go to that directory
  • Remove #s from pubspec.yaml at the indicated position
  • run flutter packages get
  • Download your font awesome pro icons (web version)
  • Move all .ttf files from the webfonts directory to /path/to/your/font_awesome_flutter/lib/fonts (replace existing fonts)
    • Note: Please make sure all .ttf files (and the following icons.json) are of the same version to avoid missing icons!
  • Move icons.json from metadata to /path/to/your/font_awesome_flutter
  • From there run ./tool/update.sh on linux or .\tool\update.bat on windows
    • Note for windows users: Please run the script in cmd or powershell only. Flutter is known to have problems with third-party shells.
  • Add version >= 4.7.0 to your project's dependencies, Override it with the path to your local installation:
dependencies:
  font_awesome_flutter: '>= 4.7.0'
  ...
  
dependency_overrides:
  font_awesome_flutter:
    path: /path/to/your/font_awesome_flutter
  ...

Duotone icons

Duotone icons require special treatment. Instead of FaIcon a special class FaDuotoneIcon needs to be used. It allows to set the primary and secondary colors for the icon. If primary and / or secondary color are not defined, they will default to the standard IconTheme color. Please be aware that only duotone style icons can be passed to this class. FaDuotoneIcon is only available if at least one duotone icon is available.

FaDuotoneIcon(
  FontAwesomeIcons.duotoneAbacus,
  primaryColor: Colors.black.withOpacity(.4),
  secondaryColor: Colors.black,
);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].