Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find bin/icon_font_generator.dart in package icon_font_generator. #42

Open
GiorgiaDip opened this issue May 14, 2024 · 5 comments

Comments

@GiorgiaDip
Copy link

Hello, I'm using icon_font_generator to add custom svg icon to my application. After completing each configuration step I noticed that my icons are some random emoji with an iphone-like style.

When trying to run this command flutter pub run icon_font_generator I have this error: Could not find bin/icon_font_generator.dart in package icon_font_generator.

Here are the steps I did:

  1. added the package to dev_dependencies (icon_font_generator: ^4.0.0)
  2. run flutter pub global activate icon_font_generator
  3. run flutter pub run icon_font_generator

Also, from the documentations, I saw there is a command called "generator" that actually builds up something but I still see my svg icons as emojes. Please if anyone encountered help me solve it

Also providing my configuration in the .yaml file:

icon_font:
  input_svg_dir: "assets/svg/"
  output_font_file: "fonts/app_icons_font.otf"

  output_class_file: "lib/src/core/theme/app_icons.dart"
  class_name: "AppIcons"
  format: true

  font_name: "App Icons"
  normalize: true
  ignore_shapes: false

  recursive: false
  verbose: false

@nhCoder
Copy link

nhCoder commented May 19, 2024

same

@manlyman29
Copy link

It's actually flutter pub run icon_font_generator:generator that works. A typo in README.md

@GiorgiaDiPlacido
Copy link

GiorgiaDiPlacido commented May 21, 2024

@manlyman29 I just tried your solution and this is always the output: Could not find 'bin/generator.dart' in package 'icon_font_generator'.

I tried to write the command in any possible way, I tried to reinstall the package too but nothing seems to work for me

EDIT: Just noticed that I wrote here to my issue with another account of mine

@manlyman29
Copy link

@GiorgiaDiPlacido Make sure you have v4 installed. On v3 the command name was different.

@GiorgiaDiPlacido
Copy link

GiorgiaDiPlacido commented May 22, 2024

@manlyman29 Thank you for the solution. I didn't noticed I still had v3 from when I was making tries. The command is now running successfully, so this one flutter pub run icon_font_generator:generator is the correct one for the icon_font_generator v4 package.

Anyway, now that the command run correctly I still see my icons as emojis instead of the actual svg icons. Any suggestion on this? Could it be a problem related to the svg icons themself?

Below you can find how my icons appears and what should they be instead

Screenshot 2024-05-22 at 09 38 52
Screenshot 2024-05-22 at 09 39 58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants