String getFileName(File file) { var fileName = (file.path.split('/').last); return file.path.replaceAll('/$fileName', ''); }