initNetwork method
Implementation
@override
Future<bool> initNetwork() async {
bool status = false;
// UnityAds.setPrivacyConsent(PrivacyConsentType.ageGate, true);
// UnityAds.setPrivacyConsent(PrivacyConsentType.ccpa, true);
// UnityAds.setPrivacyConsent(PrivacyConsentType.gdpr, true);
// UnityAds.setPrivacyConsent(PrivacyConsentType.pipl, true);
print( GlobalAdVariables.adNetworkIds?['unity']?.configId);
await UnityAds.init(
gameId: GlobalAdVariables.adNetworkIds?['unity']?.configId ?? "",
onComplete: () {
print('Initialization Success');
status = true;
},
onFailed: (error, message) {
print('Initialization Failed: $error $message');
status = false;
},
);
return status;
}