isImageFile static method
Checks if the given filename corresponds to an image file.
Parameters:
filename
: The name of the file to check.
Returns:
- A boolean indicating whether the file is an image file.
Implementation
static bool isImageFile(String filename) {
return filename.endsWith(".jpg") ||
filename.endsWith(".jpeg") ||
filename.endsWith(".png");
}