# determinePrimaryCandidate method

1. @protected

String? determinePrimaryCandidate(

1. List<String> candidates

)

Determines the primary candidate from a list of candidate names.

This method searches through the candidates and returns the first one that is marked as primary.

`candidates` the list of candidate pod names

Returns the primary candidate name, or `null` if no primary candidate exists

## Implementation

    @protected
    String? determinePrimaryCandidate(List<String> candidates) {
      for (final candidate in candidates) {
        if (isPrimaryCandidate(candidate)) {
          return candidate;
        }
      }

      return null;
    }