Premium Offers

TopPremiumOffers Composable Function

Overview

The TopPremiumOffers composable function is designed to display top premium offers within the application. It utilizes the TopOffers composable to render the offers with specific settings.

Parameters

This function accepts the following parameters with default values:

  • showMore: A boolean indicating whether to display a "show more" option. Defaults to true.

  • showMyOffers: A boolean indicating whether to show the user's personal offers. Defaults to true.

  • showMyOffersEmptyView: A boolean indicating whether to display an empty view when there are no personal offers. Defaults to false.

  • style: An integer specifying the visual style or layout for the offers. Defaults to 2. Available styles are:

    • Available Style options

      • Style 1: Default style.

      Option 1
      • Style 2: Currently used.

      Option 2
      • Style 3: Alternate layout.

      Option 3
      • Style 4: Advanced layout.

      Option 4

Configuration

The TopOffers composable is configured using the provided parameters, except for the style which is always set to 2 regardless of the input.

  • showMore: Set based on the showMore parameter.

  • showMyOffers: Set based on the showMyOffers parameter.

  • showMyOffersEmptyView: Set based on the showMyOffersEmptyView parameter.

  • style: Always set to 2, regardless of the input.

Usage

To use this composable, you can call it through the Tyrads instance like this:

Tyrads.getInstance().TopPremiumOffers(
    showMore = true,
    showMyOffers = true,
    showMyOffersEmptyView = false,
    style = 2,
)

Or, use the default values:

Tyrads.getInstance().TopPremiumOffers()

Notes

  • Style Parameter: The style parameter is not currently used to change the style of the offers; it always defaults to 2. Consider updating the function to use this parameter effectively.

Last updated