[英]Error: Cannot run with sound null safety, because the following dependencies (flutter_absolute_path)
Does the flutter_absolute_path
v1.0.6 dependency not support null safety? flutter_absolute_path
v1.0.6 依赖项不支持空安全吗? Is there any other solution to get absolute path of a file?有没有其他解决方案来获取文件的绝对路径?
for (int i = 0; i < resultList.length; i++) {
var path = await
FlutterAbsolutePath.getAbsolutePath(resultList[i].identifier);
print(path + '**path**');
f.add(File(path));
}
Try this plugin file_picker file_picker: ^3.0.3
试试这个插件 file_picker file_picker: ^3.0.3
//use this line to pick files
FilePickerResult? result = await FilePicker.platform.pickFiles();
//use this to process what file is returned
if(result != null) {
File file = File(result.files.single.path);
} else {
// User canceled the picker
}
You can read about extra features here: https://pub.dev/packages/file_picker您可以在此处阅读有关额外功能的信息: https : //pub.dev/packages/file_picker
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.