MinkTec / feather_icons_svg

Feather Icons SVG allows to customize stroke width in runtime. Uses flutter_svg instead of icon font.

Home Page:https://pub.dev/packages/feather_icons_svg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feather Icons SVG for Flutter

Feather Icons port to Flutter. This package renders the icons as SVG pictures. This makes it possible to customize icon properties in runtime (stroke width etc.).

Asset Generation

Run the following to generate the actual assets:

dart run ./tool/generator.dart

Usage

class MyExampleWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return FeatherIcon(
      FeatherIcons.calendar,
      color: Colors.red,
      size: 30,
      strokeWidth: 1.5,
    );
  }
}

You can also use FeatherIconTheme inherited widget to customize default values for Widget subtree.

Install

Add feather_icons_svg package into your pubspec.yaml.

flutter pub add flutter_icons_svg

Development

To fetch SVG icons from original Feather Icons repository, run tool/fetch-icons.sh.

Finally, to run source code generation to create flutter_icons_svg.dart file with named constructor for every icon, run tool/generator.dart.

About

Feather Icons SVG allows to customize stroke width in runtime. Uses flutter_svg instead of icon font.

https://pub.dev/packages/feather_icons_svg

License:MIT License


Languages

Language:Dart 100.0%