presentProductWithIdentifier static method

Future<PresentPresentationResult> presentProductWithIdentifier(
  1. String productVendorId, {
  2. String? presentationVendorId,
  3. String? contentId,
  4. bool isFullscreen = false,
})

Implementation

static Future<PresentPresentationResult> presentProductWithIdentifier(
    String productVendorId,
    {String? presentationVendorId,
    String? contentId,
    bool isFullscreen = false}) async {
  final result = await _channel
      .invokeMethod('presentProductWithIdentifier', <String, dynamic>{
    'productVendorId': productVendorId,
    'presentationVendorId': presentationVendorId,
    'contentId': contentId,
    'isFullscreen': isFullscreen
  });
  PLYPlan? plan;
  if (!result['plan'].isEmpty) plan = transformToPLYPlan(result['plan']);

  return PresentPresentationResult(
      PLYPurchaseResult.values[result['result']], plan);
}