Skip to content
pubscout

heroicons

0.11.0, released 2 years ago by vojtech.net

Easily use the Heroicons set in your Flutter app as SVG files.

WASM-ready
$ flutter pub add heroicons
Source repository

What it does

It renders Heroicons inside your Flutter application as SVG images using widgets like HeroIcon. It supports different styles such as outline and solid, and offers global styling via HeroIconTheme.

AI-written summary of version 0.11.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to use the official Heroicons set in your Flutter application.
  • You need icons that can be rendered dynamically as SVGs with customizable colors and sizes.

Skip it when

  • You need a general-purpose icon package that is not limited to Heroicons.
  • You prefer using standard Material or Cupertino icon fonts instead of SVG-based icon sets.

Strengths

  • Provides direct support for Heroicons with enum-based icon selection.
  • Supports global icon styling using HeroIconTheme.
  • Automatically handles semantic labels and icon sizing.

Weaknesses

  • Limited exclusively to the Heroicons icon set.
  • Depends on SVG rendering which may have performance overhead compared to font icons if used in massive quantities.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2

Run `flutter pub add heroicons` to add the package.

class MyExampleWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return HeroIcon(
      HeroIcons.calendar,
      style: HeroIconStyle.outline,
      color: Colors.red,
      size: 30,
    );
  }
}

Alternatives

Packages that do the same job and could replace heroicons.

  • heroicons_flutter

    Heroicons from Tailwind Labs as a Flutter icon set including solid, outline, micro and mini styles.

Works with

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