makePurchase method

Future<StorePurchaseStatus?> makePurchase(
  1. String storeId
)

Opens the Microsoft Store purchase UI for storeId.

storeId must be a non-empty Product Store ID. A null result means the native Store returned an unknown status value.

Implementation

Future<StorePurchaseStatus?> makePurchase(String storeId) {
  _ensureWindows();
  if (storeId.trim().isEmpty) {
    throw ArgumentError.value(storeId, 'storeId', 'Must not be empty.');
  }
  return WindowsIapPlatform.instance.makePurchase(storeId.trim());
}