presentPaymentSheet method
iOS only. Android intentionally returns a not_implemented error —
Android routes payment through Google Play User Choice Billing, and the
web payment sheet is presented internally by the SDK for upgrade/switch
offers rather than via this method.
Implementation
@override
Future<Map<String, dynamic>> presentPaymentSheet({
required String productId,
String? userId,
bool dismissible = true,
}) async {
final result = await methodChannel.invokeMethod<Map>('presentPaymentSheet', {
'productId': productId,
'userId': userId,
'dismissible': dismissible,
});
return Map<String, dynamic>.from(result!);
}