query method
Extracts the first text content from HTML tags matching the specified criteria.
Returns the first matching text content, or null if no matches found.
Implementation
String? query({
required String tag,
String? className,
String? id,
}) {
List<String> results = queryAll(tag: tag, className: className, id: id);
return results.isNotEmpty ? results.first : null;
}