getAppStoreInitiatedProducts method

Future<List<IAPItem>> getAppStoreInitiatedProducts()

Retrieves a list of products that have been attempted to purchase through the App Store iOS only.

Implementation

Future<List<IAPItem>> getAppStoreInitiatedProducts() async {
  if (_platform.isAndroid) {
    return <IAPItem>[];
  } else if (_platform.isIOS) {
    dynamic result =
        await _channel.invokeMethod('getAppStoreInitiatedProducts');

    return extractItems(json.encode(result));
  }
  throw PlatformException(
      code: _platform.operatingSystem, message: "platform not supported");
}