paywallsDidLoadCallback static method
Retrieves the paywalls configured in Product Hub > Paywalls, potentially altered based on the user's involvement in A/B testing, if any. Awaits until the inner Stores products are loaded from the App Store or Google Play.
For immediate access without awaiting SKProduct
s or ProductDetails
, use rawPaywalls()
method.
Implementation
static Future<ApphudPaywalls> paywallsDidLoadCallback() async {
final Map<dynamic, dynamic>? json = await _channel
.invokeMethod<Map<dynamic, dynamic>>('paywallsDidLoadCallback');
if (json == null) {
return ApphudPaywalls(
error: ApphudError(message: 'paywallsDidLoadCallback error'),
);
}
return ApphudPaywalls.fromJson(json);
}