icon_font_generator icon indicating copy to clipboard operation
icon_font_generator copied to clipboard

Cannot extract a file from path

Open stepesdrabes opened this issue 4 years ago • 5 comments

I'm facing this issue when I'm trying to generate the icons.

C:\Users\theza\AndroidStudioProjects\reactions_test>icon_font_generator --from=assets/ic
ons --class-name=UiIcons --out-font=assets/fonts/io_icons.ttf --out-flutter=lib/widgets/
icons.dart

Unhandled exception:
Unsupported operation: Cannot extract a file path from a c URI
#0      _Uri.toFilePath (dart:core/uri.dart:2636:7)
#1      new File.fromUri (dart:io/file.dart:248:49)
#2      GenerateCommand.run (file:///C:/Users/theza/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/icon_font_generator-3.1.0/bin/icon_font_generator.dart:111:27)
<asynchronous suspension>
#3      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#4      main (file:///C:/Users/theza/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/icon_font_generator-3.1.0/bin/icon_font_generator.dart:13:5)
<asynchronous suspension>

stepesdrabes avatar Nov 16 '21 13:11 stepesdrabes

Same here, can somebody help, please?

RBT22 avatar Nov 21 '21 11:11 RBT22

The same error. Would appreciate any help

Yahhi avatar Nov 24 '21 14:11 Yahhi

I think https://github.com/rbcprolabs/icon_font_generator/blob/76d8e8e96114c9b40c7b8e031516a1dea6855484/bin/icon_font_generator.dart#L111-L113 should be like

final iconsMap = File.fromUri(tempOutDirectory.uri.resolve(
    path.basenameWithoutExtension(argResults!['out-font']) + '.json'));

urusaich avatar Nov 29 '21 15:11 urusaich

Hello, i have the same problem...No fix yet ?

christiankadjo avatar Mar 16 '22 20:03 christiankadjo

Hi, is there any update yet? I still have the same problem in version 3.2.0.

JKazimiers avatar Jul 26 '23 08:07 JKazimiers