isFile static method

bool isFile(
  1. String? path
)

Implementation

static bool isFile(String? path) {
  if (path == null || path.trim().isEmpty) return false;
  return path.startsWith('/') ||
      path.startsWith('file://') ||
      path.contains('/storage/') ||
      path.contains(r'\');
}