xxxxxxxxxx
Directory tempDir = await getTemporaryDirectory();
String tempPath = tempDir.path;
imagepath = '${tempPath}/${pickedFile}';
print(imagepath);
xxxxxxxxxx
List<FileSystemEntity> search_dir(String directory_to_search){
//LOCALS VARIABLES
var dir;
try{
dir = new Directory(directory_to_search);
}
catch(e){
print(e);
}
List<FileSystemEntity> files = dir.listSync();
return files;
}