getAdByCountryAndLanguage method
Retrieves an advertisement by country and language from the API.
Returns a FastResponseAd object if an ad with the specified country
,
language
, appId
, and providerId
exists, otherwise returns null.
Implementation
Future<FastResponseAd?> getAdByCountryAndLanguage(
String country,
String language, {
String? providerId,
String? appId,
int? limit,
}) async {
final ads = await getAdsByCountryAndLanguage(
country,
language,
providerId: providerId,
appId: appId,
limit: limit,
);
return getRandomItem<FastResponseAd>(ads);
}