Closed skdevelopment closed 1 month ago
Thanks for the hint.
I could reproduce the issue on Windows.
But just an information for you: you should NEVER create empty strings in your paths (file or directory names). No matter if you work on Flutter projects or any other projects.
I will fix this in the next release.
Published new version: 3.4.6
Package path retrieves spaces as a %20 and doesn't allow the copy function to work.
I had to update the function to the following:
Future getBasePackagePath() async {
final packageUri =
Uri.parse('package:flutter_iconpicker/flutter_iconpicker.dart');
final packagePath = (await Isolate.resolvePackageUri(packageUri));
String resultPath = path.dirname(packagePath!.path.replaceAll('lib', ''));
if (Platform.isWindows) {
resultPath = resultPath
.replaceAll(Platform.pathSeparator, '/')
.replaceFirst('/', '')
.replaceAll('%20', ' ');
}
return resultPath;
}