flutter_custom_icons 0.0.2
flutter_custom_icons: ^0.0.2 copied to clipboard
A modern Flutter icon font package—convert SVGs to a single font, use with a generated Dart class, and keep your app lightweight.
Flutter Custom Icons #
Curated free SVG icons as lightweight Flutter font packs — scalable, themeable, zero bloat.
Features #
- ✅ 100% Free Icons - Curated from popular open-source icon sets
- ✅ Lightweight - Bundled
.ttffont files, no bloat - ✅ Scalable - Vector icons that look sharp at any size
- ✅ Themeable - Use with Flutter's
Iconwidget, supports color and size customization - ✅ Easy to Use - Simple APIs:
Icon(Iconixto.iconName)andIcon(FeatherIcons.name) - ✅ Easy to Extend - Add more icons with a single command
Included icon families:
- Iconixto (custom curated set; generated from
assets/icons/) - Feather Icons (pre-bundled classic set)
Installation #
Add this to your app's pubspec.yaml file:
dependencies:
flutter_custom_icons: ^0.0.1
Then run:
flutter pub get
Usage #
Import the package in your Dart code:
import 'package:flutter_custom_icons/flutter_custom_icons.dart';
Use the icons in your widgets.
// Iconixto icons
Icon(Iconixto.home)
// With size and color
Icon(
Iconixto.link,
size: 30,
color: Colors.blue,
)
// In a button
IconButton(
icon: Icon(Iconixto.cog1),
onPressed: () {
// Handle tap
},
)
// In an app bar
AppBar(
title: Text('My App'),
leading: Icon(Iconixto.home),
)
// Feather icons
Icon(FeatherIcons.activity)
Icon Gallery #
Here’s a quick preview of some available icons. Use your IDE’s autocomplete on Iconixto. or FeatherIcons. to browse the full set.
Iconixto (custom curated) #
| Preview | Dart Constant |
|---|---|
Iconixto.home |
|
Iconixto.home2 |
|
Iconixto.link |
|
Iconixto.link1 |
|
Iconixto.cog1 |
|
Iconixto.zoomPlus |
FeatherIcons (classic set) #
| Preview | Dart Constant |
|---|---|
| [activity] | FeatherIcons.activity |
| [airplay] | FeatherIcons.airplay |
| [alert-circle] | FeatherIcons.alertCircle |
| [anchor] | FeatherIcons.anchor |
| [book] | FeatherIcons.book |
| [heart] | FeatherIcons.heart |
See the example folder for a running demo and more icons.
For Package Maintainers #
Adding New Icons #
-
Add SVG files to
assets/icons/- Use monochrome SVGs for best results
- Sources: Heroicons, Lucide, Feather Icons, etc.
-
Run the generation script:
node tool/generate_icons.js
- Test the icons in the example app
How It Works #
The automation script:
- Scans all SVG files in
assets/icons/ - Uses Fantasticon (via
npx) to convert them to a.ttffont atassets/fonts/iconixto.ttf - Generates a Dart class (
lib/src/iconixto_icons.dart) with constants mapped to Unicode code points - Ensures names are valid Dart identifiers (lowerCamelCase)
Requirements #
- Node.js (for running the generation script)
- Fantasticon is invoked via
npx fantasticonautomatically. Optionally install globally withnpm install -g fantasticonif you prefer.
Contributing #
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Add your SVG icons to
assets/icons/ - Run
node tool/generate_icons.js - Submit a PR with your additions
License #
This package is licensed under the MIT License. See LICENSE for details.
Individual icon sets may have their own licenses. Please check the source of each icon set for specific licensing information.
Icon Sources #
Icons in this package are sourced from:
- Heroicons - MIT License
- Lucide - ISC License
- Feather Icons - MIT License
- And other free icon sources
Support #
For issues, questions, or suggestions, please file an issue on GitHub.