initialize static method
Initialize the Appodeal plugin.
During the initialization you must define the type of ads adTypes
that you would like to display in your app and
also if ads should be presented in test mode testMode
or not. Always set test mode as true
during development
or tests.
Implementation
static Future<void> initialize(
{required bool hasConsent,
List<int> adTypes = const [],
bool testMode = false,
bool verbose = false}) async {
assert(_androidAppKey != null || _iosAppKey != null,
'You must set at least one of the keys for Android or iOS');
// Register the callbacks
_setCallbacks();
return _channel.invokeMethod('initialize', {
'androidAppKey': _androidAppKey,
'iosAppKey': _iosAppKey,
'hasConsent': hasConsent,
'adTypes': adTypes,
'testMode': testMode,
'verbose': verbose,
});
}