transformPLYPresentationToMap static method

Map transformPLYPresentationToMap(
  1. PLYPresentation? presentation
)

Implementation

static Map<dynamic, dynamic> transformPLYPresentationToMap(
    PLYPresentation? presentation) {
  var presentationMap = new Map();

  presentationMap['id'] = presentation?.id;
  presentationMap['placementId'] = presentation?.placementId;
  presentationMap['audienceId'] = presentation?.audienceId;
  presentationMap['abTestId'] = presentation?.abTestId;
  presentationMap['abTestVariantId'] = presentation?.abTestVariantId;
  presentationMap['language'] = presentation?.language;
  presentationMap['type'] = presentation?.type.index;

  // Need to convert to list of map if we want to send it over to native bridge
  //presentationMap['plans'] = presentation?.plans;

  // No need to send metadata
  //presentationMap['metadata'] = presentation?.metadata;

  return presentationMap;
}