PaywallBuilder

class PaywallBuilder(val placement: String)(source)

Builder class for creating a PaywallView. This is useful in case you want to present a paywall yourself as an Android View, allowing you to customize the paywall's appearance and behavior, for example by passing in a custom Shimmer or Loading view.

Parameters

placement

The placement name for the paywall you want to display.

See also

Example:

val paywallView = PaywallBuilder("placement_name")
.params(mapOf("key" to "value"))
.overrides(PaywallOverrides())
.delegate(mySuperwallDelegate)
.shimmerView(MyShimmerView(context))
.purchaseLoadingView(MyPurchaseLoadingView(context))
.activity(activity)
.build()

Constructors

Link copied to clipboard
constructor(placement: String)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
suspend fun build(): Result<PaywallView>
@JvmName(name = "buildWithCallback")
fun build(onSuccess: (PaywallView) -> Unit, onError: (Throwable) -> Unit)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun overrides(paywallOverrides: PaywallOverrides?): PaywallBuilder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard