paywalls static method

Future<ApphudPaywalls?> paywalls()

Asynchronously retrieves paywalls from Product Hub > Paywalls, potentially altered based on the user's involvement in A/B testing, if any. Each paywall contains an array of ApphudProduct objects that can be used for purchases. ApphudProduct is Apphud's wrapper around native Stores products.

Awaits until the inner Stores products are loaded from the App Store or Google Play. If you want to obtain paywalls without awaiting for native products, you can use rawPaywalls() method.

Implementation

static Future<ApphudPaywalls?> paywalls() async {
  final Map<dynamic, dynamic>? json =
      await _channel.invokeMethod<Map<dynamic, dynamic>>('paywalls');
  return json != null ? ApphudPaywalls.fromJson(json) : null;
}