Flutter Rewarded Ads Example

This Flutter Rewarded Ads example shows how to integrate user-reward ads using Flutter Ads SDK. Users opt-in to watch ads in exchange for rewards, improving engagement, retention, and monetization.

Rewarded ads are highly effective in gaming and content apps where users voluntarily interact with ads for in-app benefits.

Flutter rewarded ads example showing user reward ad flow

Rewarding Ad Preview

How Flutter Rewarded Ads Work

Rewarded ads are opt-in experiences where users watch an ad in exchange for a benefit such as coins, unlocks, or premium features. This leads to higher engagement and better user satisfaction compared to forced ads.

1. Ensure Availability

Ensure rewarding ads are available before offering them to users.


await FlutterAds.instance.ensureAdsAvailable(
    adType: AdType.rewarding,
    context: context, // Required only if enableAutoFetch() has NOT been called
);

      

2. Show Ad


await FlutterAds.instance.showRewardingAd(
    context: context,
    testMode: true,
    styling: RewardingAdStylingModel(),
    onSuccess: () {
        // reward user
    },
    onFailure: () {
        // ad dismissed or failed
    },
);

      

3. Configuration (Optional)

Customize overlay UI, controls, and layout behavior.


RewardingAdStylingModel(
    headerTitleStyle: TextStyle(
        color: Colors.white,
        fontSize: 14,
    ),
    headerSubtitleStyle: TextStyle(
        color: Colors.white,
        fontSize: 12,
    ),
    footerTileStyle: AdListTileStyle(
        tileTitleAlignment: MainAxisAlignment.spaceEvenly,
        tileElementsAlignment: CrossAxisAlignment.center,
        tileColor: Colors.indigo,
        titleTextStyle: TextStyle(
            color: Colors.white,
            fontSize: 14,
        ),
        subtitleTextStyle: TextStyle(
            color: Colors.white,
            fontSize: 12,
        ),
    ),
    descriptionStyle: TextStyle(
        color: Colors.white,
        fontSize: 14,
        fontWeight: FontWeight.normal,
    ),
    actionStyle: TextStyle(color: Colors.white, fontSize: 13),
)

      
Reward ads should always be optional and clearly communicate the benefit to users before showing the ad.

Next Steps