canSelect method

bool canSelect(
  1. String fileName
)

Checks if a file can be selected based on allowed types.

Implementation

bool canSelect(String fileName) {
  if (_allowedTypes.isEmpty) return true;

  for (final ext in _allowedTypes) {
    if (fileName.endsWith(ext)) return true;
  }
  return false;
}