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

Use File instead of File.fromUri #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions bin/icon_font_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ class GenerateCommand extends Command {
Directory.fromUri(genRootDir.uri.resolve('temp_icons'));
final tempOutDirectory =
Directory.fromUri(genRootDir.uri.resolve('temp_font'));
final iconsMap = File.fromUri(genRootDir.uri.resolve(path.join(
tempOutDirectory.path,
path.basenameWithoutExtension(argResults!['out-font']) + '.json')));
final iconsMap = File(path.join(tempOutDirectory.path,
path.basenameWithoutExtension(argResults!['out-font']) + '.json'));
if (tempSourceDirectory.existsSync()) {
await tempSourceDirectory.delete(recursive: true);
}
Expand Down Expand Up @@ -139,11 +138,12 @@ class GenerateCommand extends Command {

final sourceIconsDirectory = Directory.fromUri(Directory.current.uri
.resolve(argResults!['from'].replaceAll('\\', '/')));
final outIconsFile = File.fromUri(Directory.current.uri
.resolve(argResults!['out-font'].replaceAll('\\', '/')));
final outFlutterClassFile = File.fromUri(Directory.current.uri
.resolve(argResults!['out-flutter'].replaceAll('\\', '/')));

final outIconsFile = File(Directory.fromUri(Directory.current.uri
.resolve(argResults!['out-font'].replaceAll('\\', '/')))
.path);
final outFlutterClassFile = File(Directory.fromUri(Directory.current.uri
.resolve(argResults!['out-flutter'].replaceAll('\\', '/')))
.path);
await tempSourceDirectory.create();
await tempOutDirectory.create();

Expand Down