isImageFilePath function

bool isImageFilePath(
  1. String text
)

Check if a given text represents an image file path.

Implementation

bool isImageFilePath(String text) {
  final cleaned = _removeOuterQuotes(text.trim());
  final unescaped = _stripBackslashEscapes(cleaned);
  return imageExtensionRegex.hasMatch(unescaped);
}