Premium Offers

The Premium Widget is a UI element that becomes available after SDK initialization. It is independent of the SDK itself and can be dragged into any Canvas within your application.

The Premium Widget provides seamless access to various offerwall features:

  • More Offers – Opens the full offerwall.

  • Active Offers – Displays active offers.

  • Campaing record - Open the page with campaign details.

  • Play – Redirects users to the store.

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(
  BuildContext context, {
    PremiumWidgetStyles widgetStyle = PremiumWidgetStyles.list,
  }
)

Parameters:

  • The context parameter is required and should be the context of the widget that will display the top offers widget.

  • The widgetStyle parameter is used to choose the style of the widget. The default style is PremiumWidgetStyles.list, which displays the offers in a list. Other available style is PremiumWidgetStyles.sliderCards, which displays the offers in a slider.

Available Widget Style options

Option 1
Option 2

Return Value:

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

Usage Example:

import 'package:tyrads_sdk/tyrads_sdk.dart';

class MyWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('Offers')),
      body: Column(
        children: [
          Tyrads.instance.topOffersWidget(context),
          // ... other widgets
        ],
      ),
    );
  }
}

Last updated