icon_font_generator
icon_font_generator copied to clipboard
Could not find bin/icon_font_generator.dart in package icon_font_generator.
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:
- added the package to dev_dependencies (icon_font_generator: ^4.0.0)
- run
flutter pub global activate icon_font_generator - 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
same
It's actually flutter pub run icon_font_generator:generator that works. A typo in README.md
@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 Make sure you have v4 installed. On v3 the command name was different.
@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
Any solution to the emoji problem?
@manlyman29 谢谢你的解决方案。我尝试的时候没注意到我还有 v3。该命令现在运行成功,所以这个命令
flutter pub run icon_font_generator:generator是 v4 包的正确命令icon_font_generator。无论如何,现在命令正确运行,我仍然将图标视为表情符号,而不是实际的 svg 图标。对此有什么建议吗?这可能是与 svg 图标本身相关的问题吗?
下面您可以看到我的图标如何显示以及它们应该是什么。
![]()
any update?