tata_rewards library

Classes

ActiveVoucherCard
A widget that displays a detailed card for an active voucher or promo reward.
AfterPlay
A model representing the after-play details, including images, instructions, and other information displayed after a user has played a game or scratched a card.
AfterPlayDet
Represents the details about what happens after the user completes a game or reward process. It contains information on the reward, associated images, instructions, and call-to-action texts.
AllAwardsSection
A widget that displays a comprehensive section of all available awards and handles various reward-related interactions.
AwardHistoryView
A widget that represents a card-like view of an award history entry.
BeforePlay
Represents the configuration of the game before the user plays it.
CongratulationsScreen
A screen that displays a congratulatory message along with reward details.
CustomerRewards
Represents a single customer reward item.
CustomerRewardsResponseModel
Represents the response model for customer rewards API.
DealOfTheDaySection
A StatefulWidget that displays a section for "Deal of the Day" promotions. It includes various callback functions for handling interactions like navigation, error handling, category selection, and deal click events.
Design
Represents the visual and UI configuration for the game, divided into the design shown before and after the game is played.
DesignDetails
Represents the design details associated with a reward, including information about what happens after the game or reward process is completed.
Details
A model representing additional details about a reward or game, such as after-play information.
EnumValues<T>
A generic class for mapping enums to their string representations and vice versa.
ExpiredVoucherCard
A widget that displays the UI for an expired voucher in the user's reward history.
FortuneAfterPlay
Represents the UI content displayed after the spin-the-wheel game is played.
FortuneDesignDetails
Represents the visual and reward-related design details for a spin reward in the fortune game.
FortuneReward
A model class that represents a fortune reward in a spin-the-wheel game.
FortuneWheel
Represents a Fortune Wheel object, typically used in a rewards or scratch card system.
FortuneWheelBottomSheet
A bottom sheet widget representing a fortune wheel game interface.
FortuneWheelPart
A widget representing a section of a fortune wheel game experience.
FortuneWheelRepo
A singleton repository class that manages data related to the Fortune Wheel feature.
FortuneWheelResponse
Represents the response from a Fortune Wheel API, containing a message, a list of FortuneWheel data, and the total number of scratch cards.
GameDetails
Represents the details of a quiz or question-based game.
GameLedger
Represents a record in the game ledger, capturing information about gameplay rewards, offer generation, and loyalty points.
HistoryScreen
HistoryScreen is a customizable screen widget that displays the user's rewards history in different categories: Neu Coins, Vouchers, and Digital Gold. It allows the implementation of various callback functions and custom UI elements such as appBar title, back icon, and padding adjustments.
MyAllExpiredScratchCards
A StatefulWidget representing a page that displays all expired scratch cards in the MyRewards SDK.
MyAllScratchCards
A StatefulWidget that displays all scratch cards for users in the MyRewards SDK. This page allows users to view and interact with their scratch cards, with pagination and refresh functionality.
MyAllSpinCards
A StatefulWidget that displays all spin cards for users in the MyRewards SDK. This page allows users to view and interact with their spin cards, including quizzes and reward collection.
MyRewardsPage
A StatefulWidget representing the main page of the MyRewards SDK component. This page handles the display of customer rewards, scratch cards, and products.
MyRewardsRepo
A singleton repository that manages scratch card data, including sorting, rendering, and tracking totals.
MyRewardsSdk
Singleton class for MyRewardsSdk
OfferDetails
Represents detailed information about a specific offer.
OfferDetailsResponse
Represents the response object for an offer details API call.
OfferDetailsScreen
A screen that displays detailed information about a specific offer.
OfferEngineResponse
Represents the response from the Offer Engine which provides information about a generated offer or coupon for a customer.
Option
Represents a single answer option in a question-based game.
OtherOffer
Represents another offer related to the primary one in focus.
Product
A model class representing a product.
QuizScreen
A screen widget that displays a quiz question with multiple options. It handles various user interactions and callbacks related to the quiz flow.
ReferAndEarnSection
A section widget that displays "Refer and Earn" banners.
Reward
A model representing a reward associated with a scratch card, offer, or game.
RewardDet
Represents a reward detail, including information about the reward type, design, and associated product data.
RewardDetailResponse
A model that represents the response of a reward detail request, typically used in gamified features like quizzes or spin-the-wheel.
RewardDetailsPage
A page that displays detailed information about a specific reward.
RewardType
Represents a type of reward, with an identifier and a name.
ScratchCard
A model representing a scratch card for a game or offer.
ScratchCardResponse
Represents a response from an API that contains scratch cards and related details.
ScratchCardSections
A StatelessWidget that displays a section containing a horizontal list of scratch cards and a "View All" CTA to navigate to a page showing all available scratch cards.
ScratchCardView
A widget that displays a scratch card view with various callbacks and customizations.
ScratchDialog
A dialog widget that represents a scratch card interface.
ScratchReward
A widget representing the main screen for the Scratch Reward feature.
Spinner
A widget that represents a spinner (e.g., fortune wheel) for a game or reward system.
SpinnerRewardResponse
Represents the full response from a spinner-based game reward system.
SpinRewards
Represents an individual reward item that can be received from spinning the wheel.
SpinTheWheelGrid
A widget that displays a grid of fortune wheel cards.
SpinTheWheelSection
A widget that represents the Spin-the-Wheel section with various reward interactions.
Spoke
Represents a segment/spoke on the spin wheel. Currently, this class is a placeholder with no properties defined.
VoucherAwardsHistoryView
A widget that displays an interactive voucher award card (active or expired), and handles tap interactions to trigger navigation or callbacks based on the voucher state.
WrongAnswerScreen
A screen displayed when the user selects an incorrect answer in a quiz or challenge.

Enums

CurrencyCode
Enum representing different types of currencies.
CurrencyName
Enum representing different types of currencies.
Offer
Enum representing different types of offers available in the system.
OrgEnum
Enum representing organizations.
PlayedStatus
Enum representing the different states of a game or activity play.
RewardsEnum
Enum representing various reward types.
Status
Enum representing the various statuses of an item or reward.
VoucherActivationEnum
Enum representing voucher activation states.

Properties

currencyCodeValues EnumValues<CurrencyCode>
The EnumValues class provides methods to:
final
currencyNameValues EnumValues<CurrencyName>
The EnumValues class provides methods to:
final
offerValues EnumValues<Offer>
A mapping of string representations of offers to their corresponding enum values.
final
playedStatusValues EnumValues<PlayedStatus>
A mapping of string values to the PlayedStatus enum for easy conversion.
final
scaffoldMessengerKey GlobalKey<ScaffoldMessengerState>
Global key used to access the ScaffoldMessengerState for showing SnackBars or other scaffold-related messages.
final
statusValues EnumValues<Status>
A mapping of string values to corresponding Status enum values.
final