Flutter 颤振条纹本地支付崩溃

Flutter 颤振条纹本地支付崩溃,flutter,dart,applepay,Flutter,Dart,Applepay,我正在尝试接受flutter中的原生苹果支付,我一直在pubdev中跟进,并在那里构建了示例。我已经尝试在我自己的应用程序中实现本机支付: Scaffold(body: ListView(....), floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat, floatingActionButton: Container( width: 100, height:

我正在尝试接受flutter中的原生苹果支付,我一直在pubdev中跟进,并在那里构建了示例。我已经尝试在我自己的应用程序中实现本机支付:

Scaffold(body: ListView(....),
  floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
      floatingActionButton: Container(
        width: 100,
        height: 100,
        child: FloatingActionButton(
            splashColor: Colors.red,
            backgroundColor: Colors.white,
            child: const Icon(
              Icons.payment,
              color: Colors.red,
              size: 50.0,
            ),
            onPressed: ()  async {
              Token paymentToken = await StripePayment.paymentRequestWithNativePay(
                androidPayOptions: null,
              applePayOptions: ApplePayPaymentOptions(
              countryCode: 'US',
              currencyCode: 'USD',
              items: [
              ApplePayItem(
              label: 'Test',
              amount: '13',
              )
              ],
              ));
              print(paymentToken.toString());
            }),
      )
ListView根据选择的项目动态呈现卡片小部件。当我按下浮动操作按钮进行购买时,应用程序崩溃。我得到这个错误:

Lost connection to device.
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff23e3cf0e __exceptionPreprocess + 350
    1   libobjc.A.dylib                     0x00007fff50ba89b2 objc_exception_throw + 48
    2   UIKitCore                           0x00007fff485f256e -[UIViewController _presentViewController:withAnimationController:completion:] + 5218
    3   UIKitCore                           0x00007fff485f4a2e __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 98
    4   UIKitCore                           0x00007fff485f4f37 -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 511
    5   UIKitCore                           0x00007fff485f498c -[UIViewController _presentViewController:animated:completion:] + 187
    6   UIKitCore                           0x00007fff485f4bf8 -[U<…>

与设备的连接中断。
***第一次抛出调用堆栈:
(
0 CoreFoundation 0x00007fff23e3cf0e例外预处理+350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_异常_抛出+48
2 UIKitCore 0x00007fff485f256e-[UIViewController\u presentViewController:带动画控制器:完成:][5218
3 UIKitCore 0x00007fff485f4a2e uu 63-[UIViewController u presentViewController:动画:完成:]block_invoke+98
4 UIKitCore 0x00007fff485f4f37-[UIViewController\u性能协调演示文稿:动画:][511
5 UIKitCore 0x00007fff485f498c-[UIViewController\u presentViewController:动画:完成:+187
6 UIKitCore 0x00007fff485f4bf8-[U

我想我的浮动动作按钮妨碍了苹果动画。我想把浮动按钮保留在那里,它看起来真的很不错。任何帮助都会很棒,谢谢!

兄弟尝试删除任何其他条带库。我有同样的问题,但两者都有

    stripe_native
    stripe_payment
所以我的错误被解决了