query method

String? query({
  1. required String tag,
  2. String? className,
  3. String? id,
})

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;
}