purchaseFuture method

Future<LinkFiveActiveProducts> purchaseFuture(
  1. dynamic productDetails
)

USE WITH CARE. We're currently testing the new purchase method

All In App purchases are handled async, it's difficult to work with futures.

We're waiting for the next purchase update and complete the future.

Implementation

Future<LinkFiveActiveProducts> purchaseFuture(dynamic productDetails) async {
  makeSureIsInitialize();
  final completer = Completer<LinkFiveActiveProducts>();
  registeredPurchaseCompleterList.add(completer);
  await purchase(productDetails);
  return completer.future;
}