initialize method

  1. @override
Future<void> initialize({
  1. required String publisherId,
  2. String? gdprConsentString,
  3. bool? isGdprApplicable,
  4. String? prebidServerUrl,
})
override

Implementation

@override
Future<void> initialize({
  required String publisherId,
  String? gdprConsentString,
  bool? isGdprApplicable,
  String? prebidServerUrl,
}) {
  final arguments = <String, Object?>{'publisherId': publisherId};
  if (gdprConsentString != null) {
    arguments['gdprConsentString'] = gdprConsentString;
  }
  if (isGdprApplicable != null) {
    arguments['isGdprApplicable'] = isGdprApplicable;
  }
  if (prebidServerUrl != null) {
    arguments['prebidServerUrl'] = prebidServerUrl;
  }
  return methodChannel.invokeMethod<void>('initialize', arguments);
}