Home > Back-end >  Don't assign to void
Don't assign to void

Time:04-03

I tried to figure out the reason, but it seems there is only one issue linked to github, it keeps displaying this warning, plz let me know the reason, thanks a lot!

onPressed: () async {
    print('now trying to purchase');
    _purchaserInfo = await Purchases.purchasePackage(widget.package);
    print('purchase completed');

    appData.isGoldWorm = _purchaserInfo.entitlements.all["all_features"].isActive;

    print('is user pro? ${appData.isGoldWorm}');
}

CodePudding user response:

Without seeing the entire code and warning it is hard. I see you are defining the _purchaseInfo with the await but you aren't calling it so it may seem to the function that you are using async but not await, and so you cant assign it correctly.

  • Related