icon_font_generator icon indicating copy to clipboard operation
icon_font_generator copied to clipboard

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

Open GiorgiaDip opened this issue 1 year ago • 5 comments

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

GiorgiaDip avatar May 14 '24 16:05 GiorgiaDip

same

nhCoder avatar May 19 '24 16:05 nhCoder

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

lume-code avatar May 21 '24 09:05 lume-code

@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

GiorgiaDiPlacido avatar May 21 '24 09:05 GiorgiaDiPlacido

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

lume-code avatar May 22 '24 07:05 lume-code

@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

GiorgiaDiPlacido avatar May 22 '24 07:05 GiorgiaDiPlacido

Any solution to the emoji problem?

g5fighter avatar Nov 22 '24 10:11 g5fighter

@manlyman29 谢谢你的解决方案。我尝试的时候没注意到我还有 v3。该命令现在运行成功,所以这个命令flutter pub run icon_font_generator:generator是 v4 包的正确命令icon_font_generator

无论如何,现在命令正确运行,我仍然将图标视为表情符号,而不是实际的 svg 图标。对此有什么建议吗?这可能是与 svg 图标本身相关的问题吗?

下面您可以看到我的图标如何显示以及它们应该是什么。

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

any update?

codepgq avatar Feb 14 '25 01:02 codepgq