onPlatformViewCreated method

void onPlatformViewCreated(
  1. int id
)

A method that passes ad parameters to the PassParameters class The unique ID is used for method channel communication

Implementation

void onPlatformViewCreated(int id) {
  // PassParameters( adType, configId, adUnitId, height, width, refreshInterval, id);
  MethodChannel _channel =
      MethodChannel('setupad.plugin.setupad_prebid_flutter/myChannel_$id');
  debugPrint("PrebidPluginLog on platform view created");
  _channel.invokeMethod('setParams', {
    "adType": adType,
    "configId": configId,
    "adUnitId": adUnitId,
    "height": height,
    "width": width,
    "refreshInterval": refreshInterval
  });
}