brandl paul
brandl paul

Reputation: 161

Don't assign to void

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}');
}

Upvotes: 1

Views: 1536

Answers (1)

flutterloop
flutterloop

Reputation: 578

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.

Upvotes: 1

Related Questions