purchase method

  1. @override
Future<Map<String, dynamic>> purchase({
  1. required String productId,
  2. String? presentation,
})
override

Unified purchase entry point. Routes to web checkout or StoreKit based on jurisdiction + remote config; can be overridden per-call by presentation.

Implementation

@override
Future<Map<String, dynamic>> purchase({
  required String productId,
  String? presentation,
}) async {
  final result = await methodChannel.invokeMethod<Map>('purchase', {
    'productId': productId,
    if (presentation != null) 'presentation': presentation,
  });
  return Map<String, dynamic>.from(result!);
}