我正在将代码从 更改为WillPopScope来PopScope捕获后退按钮的按下情况。我需要在返回上一屏幕之前显示一个对话框。因此,我需要发出Navigator.pop两次,一次关闭对话框,另一次返回上一个屏幕。下面的代码可以正常工作,但是当我将其更改为“since is depreciated”时,会抛出WillPopScope错误 。'!_debugLocked': is not truePopScopeWillPopScope
// return WillPopScope(\nreturn PopScope(\n canPop:true,\n onPopInvoked: (bool didPop) async{\n // onWillPop: () async {\n if (vStatus[1] && !vStatus[2]) {\n _showMaterialDialog(context, 1);\n }\n return Future.value(true);\n },\n child: Scaffold(\n \xe2\x80\xa6\xe2\x80\xa6.\n\n\nvoid _showMaterialDialog(BuildContext context, int opt) {\n showDialog(\n context: context,\n builder: (context) {\n return AlertDialog(\n title: Text(getTextTitle(opt),style:TextStyle(fontFamily: 'DancingScriptBold',color:Colors.blue, fontSize: 20.0)),\n content: Text(getTextContent(opt),\n style: const TextStyle(\n fontFamily: 'DancingScriptBold', color:Colors.blue,fontSize: 20.0),\n ),\n actions: <Widget>[\n TextButton(\n onPressed: …Run Code Online (Sandbox Code Playgroud) 我尝试将我的应用程序迁移到计费版本 5.0.0 它适用于我的某些应用程序,但其中一个应用程序崩溃并出现以下错误。如果我恢复到计费版本 3.0.2,则它可以工作。
E/AndroidRuntime( 9885): java.lang.NoSuchMethodError: No virtual method setReplaceSkusProrationMode(I)Lcom/android/billingclient/api/BillingFlowParams$Builder; in class Lcom/android/billingclient/api/BillingFlowParams$Builder; or its super classes (declaration of 'com.android.billingclient.api.BillingFlowParams$Builder' appears in /data/app/~~T2Kh46nWychg2xWUZiO5EA==/com.blueedgez.paintover-IPoCtqgP0Ez5df07rfzPyw==/base.apk!classes2.dex)
E/AndroidRuntime( 9885): at io.flutter.plugins.inapppurchase.MethodCallHandlerImpl.launchBillingFlow(MethodCallHandlerImpl.java
Run Code Online (Sandbox Code Playgroud)