isImage static method
Checks if string is an image file.
Implementation
static bool isImage(String filePath) {
final ext = filePath.toLowerCase();
return ext.endsWith('.jpg') ||
ext.endsWith('.jpeg') ||
ext.endsWith('.png') ||
ext.endsWith('.gif') ||
ext.endsWith('.bmp');
}