icon_bundler
1.1.3, released a year ago by aloisdeniel.com
Bundle collections of svg, png, and jpg files into a single spritesheet image with generated code.
What it does
Processes a directory of icon files (SVG, PNG, JPG) to pack them into a single spritesheet image and generates Dart widgets and data classes for easy access. Handles multiple pixel ratios and optional sizing through a CLI tool.
AI-written summary of version 1.1.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to reduce the number of individual asset files in your project.
- You need to bundle mixed SVG, PNG, and JPG icon assets into spritesheets.
Skip it when
- You prefer runtime loading of individual asset files without a CLI build step.
- You cannot install external CLI dependencies like resvg for SVG rendering.
Strengths
- Reduces asset count by combining icons into a single spritesheet.
- Supports multiple pixel ratios and custom sizing options.
- Generates ready-to-use widgets and data access classes.
Weaknesses
- Requires external tools like resvg installed locally for SVG rendering.
- Relies on a separate CLI workflow rather than a build_runner integration.
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 4
Requires installing the resvg command-line tool and activating the package globally via pub global activate.
@override
Widget build(BuildContext context) {
return AppIcon(
AppIcons.magicFill,
color: Colors.blue,
size: 64,
);
}Alternatives
Packages that do the same job and could replace icon_bundler.
- flutter_svg
If you prefer rendering individual SVG files at runtime without generating spritesheets.
100Compare
Works with
Packages commonly used together with icon_bundler: ones it builds on, ones built on it, and its own family.
- argsicon_bundler depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- imageicon_bundler depends on itPure Dart library to load, manipulate, encode, and decode various image formats.
- recaseicon_bundler depends on itChanges the case of input text to various conventions.