myUtilsHandler static method

Future myUtilsHandler(
  1. MethodCall methodCall,
  2. RewardAdCallbacks rewardAdCallbacks
)

Implementation

static Future<dynamic> myUtilsHandler(
  MethodCall methodCall,
  RewardAdCallbacks rewardAdCallbacks,
) async {
  switch (methodCall.method) {
    case "loaded_reward":
      rewardAdCallbacks.onLoad(methodCall.arguments);
      break;
    case "fail_load_reward":
      rewardAdCallbacks.onAdLoadFail(methodCall.arguments);
      break;
    case "open_reward":
      rewardAdCallbacks.onAdOpen(methodCall.arguments);
      break;
    case "fail_open_reward":
      rewardAdCallbacks.onAdOpenFail(methodCall.arguments);
      break;
    case "close_reward":
      rewardAdCallbacks.onClose(methodCall.arguments);
      break;
    case "rewarded_reward":
      rewardAdCallbacks.onRewardEarned(methodCall.arguments);
      break;
    default:
      // rewardAdCallbacks.onClose(methodCall.arguments);
      print("Default Case ${methodCall.method}");
  }
}