restoreWithFuture method

Future<LinkFiveActiveProducts> restoreWithFuture()

USE WITH CARE. We're currently testing the new restore 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> restoreWithFuture() async {
  makeSureIsInitialize();
  final completer = Completer<LinkFiveActiveProducts>();
  registeredPurchaseCompleterList.add(completer);
  await restore();
  return completer.future;
}