createWebPaywallUrl method
Implementation
Future<String> createWebPaywallUrl({
AdaptyFlowPaywall? paywall,
AdaptyPaywallProduct? product,
}) async {
Map<String, dynamic>? arguments;
if (paywall != null) {
arguments = {Argument.paywall: paywall.jsonValue};
} else if (product != null) {
arguments = {Argument.product: product.jsonValue};
} else {
throw AdaptyError(
'Either paywall or product parameter must be provided',
AdaptyErrorCode.wrongParam,
null,
);
}
return _invokeMethod<String>(
Method.createWebPaywallUrl,
(data) => data as String,
arguments,
);
}