Skip to content
pubscout

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.

$ flutter pub add icon_bundler
Source repository

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.

Works with

Packages commonly used together with icon_bundler: ones it builds on, ones built on it, and its own family.