applyToParams method
Apply authentication settings to header and query params.
Implementation
@override
void applyToParams(QueryParams query, Map<String, String?> headers) {
String? value;
if (apiKeyPrefix != null) {
value = '$apiKeyPrefix $apiKey';
} else {
value = apiKey;
}
if (location == 'query' && value != null) {
query[paramName] = value;
} else if (location == 'header' && value != null) {
headers[paramName] = value;
}
}