svg_to_flutter_icons 0.1.1 copy "svg_to_flutter_icons: ^0.1.1" to clipboard
svg_to_flutter_icons: ^0.1.1 copied to clipboard

CLI tool to clean SVGs, generate icon fonts, and create Flutter IconData classes.

example/svg_to_flutter_icons_example.dart

import 'package:svg_to_flutter_icons/svg_to_flutter_icons.dart';

void main(List<String> args) {
  if (args.isEmpty) {
    print('Example usage:');
    print('  dart run example clean assets/icons');
    print('  dart run example generate assets/fonts');
    return;
  }

  final command = args[0];
  final path = args.length > 1 ? args[1] : null;

  if (command == 'clean' && path != null) {
    cleanSvgFolder(path);
    return;
  }

  if (command == 'generate' && path != null) {
    generateIconsFromAssets(assetsPath: path);
    return;
  }

  print('Invalid command.');
  print('Use:');
  print('  dart run example clean <svg-folder>');
  print('  dart run example generate <fonts-folder>');
}
1
likes
150
points
116
downloads

Documentation

API reference

Publisher

verified publisherpenta-k.com

Weekly Downloads

CLI tool to clean SVGs, generate icon fonts, and create Flutter IconData classes.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

args, path, yaml, yaml_edit

More

Packages that depend on svg_to_flutter_icons