flutter_custom_icons 0.0.1
flutter_custom_icons: ^0.0.1 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 (iconixto) #
Curated free SVG icons as a lightweight Flutter font pack — scalable, themeable, zero bloat.
Features #
- ✅ 100% Free Icons - Curated from popular open-source icon sets
- ✅ Lightweight - Single
.ttffont file, 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 API:
Icon(Iconixto.iconName) - ✅ Easy to Extend - Add more icons with a single command
Installation #
Add this to your package'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 font):
// Basic usage
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),
)
Available Icons (sampler) #
Current sampler includes (names match Iconixto.*):
home,home2,home3,home4link,link1,link2,link3cog1,cog2zoomPlus
See the example folder for a complete demo.
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 to convert them to a
.ttffont - Generates a Dart class (
lib/src/iconixto_icons.dart) with constants mapped to Unicode codepoints - Ensures names are valid Dart identifiers (lowerCamelCase)
Requirements #
- Node.js (for running the generation script)
- Fantasticon:
npm install -g fantasticon
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.