Checking valid image file
bool isImageFile(String fileName) { return fileName.endsWith('.png') || fileName.endsWith('.jpg') || fileName.endsWith('.jpeg'); }