matchesNode static method

bool matchesNode(
  1. dynamic node
)

Implementation

static bool matchesNode(node) {
  if (node is! String) return false;

  if (DataURLBase64.matches(node)) {
    return true;
  } else if (isHttpURL(node) || _isFilePath(node)) {
    var url = node.toString().trim();
    if (url.contains('?')) {
      url = node.split('?')[0];
    }

    var match = _hasImageExtension(url);
    return match;
  }

  return false;
}