showRewardedVideoAd static method

Future<bool?> showRewardedVideoAd({
  1. int delay = 0,
})

Shows a rewarded video Ad after it has been loaded. (This needs to be called only after calling loadRewardedVideoAd function). delay is in milliseconds.

Example:

FacebookRewardedVideoAd.loadRewardedVideoAd(
  listener: (result, value) {
    if(result == RewardedVideoAdResult.LOADED)
      FacebookRewardedVideoAd.showRewardedVideoAd();
  },
);

Implementation

static Future<bool?> showRewardedVideoAd({int delay = 0}) async {
  try {
    final args = <String, dynamic>{
      "delay": delay,
    };

    final result = await _channel.invokeMethod(
      SHOW_REWARDED_VIDEO_METHOD,
      args,
    );

    return result;
  } on PlatformException {
    return false;
  }
}