init method
Register the App key that’s already been applied before requesting an ad from TikTok Audience Network.
iOS
config for iOS
android
config for Android
Implementation
Future<PangleResult> init({
IOSConfig? iOS,
AndroidConfig? android,
}) async {
Map<String, dynamic>? result;
if (Platform.isIOS && iOS != null) {
result = await _methodChannel.invokeMapMethod<String, dynamic>(
'init',
iOS.toJSON(),
);
} else if (Platform.isAndroid && android != null) {
result = await _methodChannel.invokeMapMethod<String, dynamic>(
'init',
android.toJSON(),
);
}
return PangleResult.fromJson(result);
}