validateImageFile method

String? validateImageFile()

Validates if the XFile represents a valid image file. Uses name on Web (since path is a blob), otherwise path.

Implementation

String? validateImageFile() {
  final source = path.toLowerCase().startsWith('blob:') ? name : path;
  return source.validateImagePath();
}