Home > OS >  Flutter local authentication (on IOS device) throws PlatformException exception when user tapped can
Flutter local authentication (on IOS device) throws PlatformException exception when user tapped can

Time:01-11

I received a PlatformException with the exception code "NotAvailable" and the message "canceled by user" when the user tapped the cancel button. Here are the codes:

enter image description here

debug logs: enter image description here

I want to know how to distinguish the "real" exception error or the user tapped canceled button, because they have the same error code "NotAvailable".If only relying on error messages is not a good solution.

local_auth: 2.1.0

CodePudding user response:

I have same problem :( I'm not sure how to handle it (very khoai lang) catching the same strings doesn't seem to be the best option.

CodePudding user response:

It seems like you want to integrate local authentication into your app. I got you. I've done the same thing in one of my projects.

Here's the link to my repository: https://github.com/dharambudh1/local-authentication-demo

It is a runnable code. It is well-tested on Android & iOS.

  • Related