isValidForPlatform static method

bool isValidForPlatform(
  1. ErrorCode errorCode,
  2. IapPlatform platform
)

Checks if an error code is valid for the specified platform

Implementation

static bool isValidForPlatform(ErrorCode errorCode, IapPlatform platform) {
  if (platform == IapPlatform.IOS) {
    return ErrorCodeMapping.ios.containsKey(errorCode);
  } else {
    return ErrorCodeMapping.android.containsKey(errorCode);
  }
}