icomoon_icons_generator 1.0.0+4 copy "icomoon_icons_generator: ^1.0.0+4" to clipboard
icomoon_icons_generator: ^1.0.0+4 copied to clipboard

CLI for generating icons from the website icomoon.io font to the Flutter Icon class.

Icon Font Generator #

Setup #

Installing #

dart pub global activate icomoon_icons_generator

Run Package #

Note : #

  • The CSS file will be obtained by downloading the icon font from the website http://icomoon.io.
dart pub global run icomoon_icons_generator <input CSS file> <output Dart file> <output Mapper Dart file> <Font Family> <Class Name>

Example CLI #

dart pub global run icomoon_icons_generator input.css output.dart mapper.dart "moonIcon" "MoonIcons"

Updated Flutter project's pubspec.yaml: #

flutter:
  fonts:
    - family: moonIcon
      fonts:
        - asset: fonts/icomoon.ttf

Example #

import 'package:flutter/material.dart';

class MoonIcons {
  static const String _fontFamily = 'moonIcon';

  static const add = IconData(0xe901, fontFamily: _fontFamily);
}

Map<String, IconData> getIcons() {
  return {
    "add": MoonIcons.add,
  };
}
0
likes
140
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

CLI for generating icons from the website icomoon.io font to the Flutter Icon class.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

More

Packages that depend on icomoon_icons_generator