heroicons_flutter 0.4.0 copy "heroicons_flutter: ^0.4.0" to clipboard
heroicons_flutter: ^0.4.0 copied to clipboard

Heroicons from Tailwind Labs as Flutter icons set. Includes all solid, outline, micro and mini Heroicons.

heroicons_flutter #

Heroicons Cover

Heroicons from Tailwind Labs as Flutter icons set. See the demo here.

Icons List #

All the available icons can be found at the official Heroicons website or at the demo site built with this package.

Usage #

All the available Heroicons can be used as Flutter icon as shown below.

import 'package:heroicons_flutter/heroicons_flutter.dart';

class MyWidget extends StatelessWidget {
  const MyWidget({super.key});

  Widget build(BuildContext context) {
    return new Column(
      children: <Widget>[
        const Icon(
          // Solid Icon
          HeroiconsSolid.faceSmile,
          color: Colors.blue,
        ),
        const Icon(
          // Mini Icon
          HeroiconsMini.banknotes,
          color: Colors.blue,
        ),
        Icon(
          // Outline Icon
          HeroiconsOutline.academicCap,
          color: Colors.blue,
        )
        Icon(
          // Micro Icon
          HeroiconsOutline.radio,
          color: Colors.blue,
        )
      ],
    );
  }
}

You can also use the icon by passing the string icon names to the fromString() method as below.

[!WARNING] Tree shaking won’t work when fromString() is used since this needs to go through the list of icons to find the one that matches the given string.

// camelCase
HericonsOutline.fromString("academicCap")

fromString() method also accepts snake_case, kebab-case and dot.notation strings.

15
likes
150
points
924
downloads

Publisher

unverified uploader

Weekly Downloads

Heroicons from Tailwind Labs as Flutter icons set. Includes all solid, outline, micro and mini Heroicons.

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on heroicons_flutter