According to the Plugin documentation you can use the API

getAvailablePurchases

That looking at the library native code, this method is link to

// getAvailablePurchases
- (void)getAvailableItems:(FlutterResult)result {
    [[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
    flutterResult = result;
}

 

And from Apple docs:

Declaration

func restoreCompletedTransactions()

Discussion

Use this method to restore finished transactions—that is, transactions for which you have already called finishTransaction(_:). You call this method in one of the following situations: To install purchases on additional devices To restore purchases for an application that the user deleted and reinstalled

So adding a Widget Button (the one you like most) is up to you, and you can put it wherever you want.

Then in the onClick event call getAvailableItems and manage the previously bought purchases of the users and reinstall them in the user's device.

 

https://stackoverflow.com/questions/53776179/flutter-iap-how-to-restore-purchases

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐