hasValidExtension static method

bool hasValidExtension(
  1. String filename
)

Validates if filename has a supported extension

Platform Support: All

Parameters:

  • filename: The filename to validate

Returns: true if filename has a supported extension, false otherwise

Implementation

static bool hasValidExtension(String filename) {
  final extension = getExtension(filename);
  return supportedExtensions.contains(extension);
}