【问题标题】:Flutter local authentication (on IOS device) throws PlatformException exception when user tapped cancel button当用户点击取消按钮时,Flutter 本地身份验证(在 IOS 设备上)抛出 PlatformException 异常
【发布时间】:2023-01-11 12:38:55
【问题描述】:

当用户点击取消按钮时,我收到了带有异常代码“NotAvailable”的 PlatformException 和消息“已被用户取消”。以下是代码:

enter image description here

调试日志: enter image description here

我想知道如何区分“真正的”异常错误或用户点击取消按钮,因为它们具有相同的错误代码“NotAvailable”。如果仅依靠错误消息不是一个好的解决方案。

local_auth:2.1.0

【问题讨论】:

    标签: flutter localauthentication


    【解决方案1】:

    我有同样的问题 :( 我不确定如何处理它(非常 khoai lang)捕捉相同的字符串似乎不是最好的选择。

    【讨论】:

      猜你喜欢
      • 2016-09-12
      • 2023-03-09
      • 1970-01-01
      • 2018-10-29
      • 1970-01-01
      • 1970-01-01
      • 2015-03-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多