getCurrentPlatform function
Get current platform
Implementation
IapPlatform getCurrentPlatform() {
if (defaultTargetPlatform == TargetPlatform.iOS ||
defaultTargetPlatform == TargetPlatform.macOS) {
// macOS uses the same StoreKit framework as iOS
return IapPlatform.IOS;
} else if (defaultTargetPlatform == TargetPlatform.android) {
return IapPlatform.Android;
}
throw UnsupportedError('Platform not supported');
}