queryByType

TestNode? queryByType(

  1. String type
)

Query by type (returns null if not found) instead of throwing.

Implementation

TestNode? queryByType(String type) {
  final results = findByType(type);
  return results.isEmpty ? null : results.first;
}