placement static method

Future<ApphudPlacement?> placement(
  1. String identifier
)

Asynchronously retrieves a specific paywall placement by its identifier configured in Product Hub > Placements, 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.

A placement is a specific location within a user's journey (such as onboarding, settings, etc.) where its internal paywall is intended to be displayed. See documentation for details: https://docs.apphud.com/docs/placements For immediate access without awaiting Stores products, use rawPlacements() method.

Returns: An ApphudPlacement object if found, or null if no matching placement is found.

Implementation

static Future<ApphudPlacement?> placement(String identifier) async {
  final Map<dynamic, dynamic>? json = await _channel.invokeMethod(
    'placement',
    {
      'identifier': identifier,
    },
  );
  return json == null ? null : ApphudPlacement.fromJson(json);
}