doesFileExist function
Implementation
Future<bool> doesFileExist(String? filePath) async {
int fileSize = 0;
bool fileExists = false;
if (filePath != null) {
var file = File(filePath);
if (await file.exists()) {
fileSize = await file.length();
if (fileSize > 0) fileExists = true;
}
}
return fileExists;
}