Premium Offers

This method returns a pre-built Flutter widget that displays a list of top offers. It provides several customization options to control the widget's appearance and behavior.

Tyrads.instance.topOffersWidget({
  bool showMore = true,
  bool showMyOffers = true,
  bool showMyOffersEmptyView = false,
  int widgetStyle = 1
})

Parameters:

  • showMore (bool, optional): Determines whether a "Show More" button is displayed at the bottom of the widget. This button typically navigates the user to a full screen of available offers. Defaults to true.

  • showMyOffers (bool, optional): Determines whether a section displaying the user's current/claimed offers is shown within the widget. Defaults to true.

  • showMyOffersEmptyView (bool, optional): If showMyOffers is true, this determines whether a special view is displayed when the user has no current offers. This view might include a prompt to explore available offers. Defaults to false.

  • widgetStyle (int, optional): An integer value that selects a pre-defined style for the widget. Different style values might change the widget's layout, color scheme, or other visual aspects. Defaults to 1.

Available Widget Style options

Option 1
Option 2
Option 3
Option 4

Return Value:

  • Widget: A Flutter Widget (specifically, a TopOffersWidget) that can be embedded in your application's UI.

Usage Example:

Last updated