问题描述
嗨,我是渐进式Web应用程序Flutter中的新手,所以我想通过Flutter应用程序执行PWA项目...在我的Flutter应用程序中,我具有使用local_auth
Flutter软件包使用指纹进行身份验证的功能,这是我将其用于应用程序时的代码
Future<void> _authenticate() async {
bool authenticated = false;
try {
SharedPreferences prefs = await SharedPreferences.getInstance();
bool checkTrial = prefs.getBool("trial");
if (checkTrial == null || checkTrial == false) {
authenticated = await auth.authenticateWithBiometrics(
localizedReason: 'Scan fingerprint',useErrorDialogs: true,stickyAuth: true);
if (authenticated) {
await prefs.setBool('trial',authenticated);
}
} else {
setState(() {
statusAuth = true;
});
}
} on PlatformException catch (e) {
print(e);
}
if (!mounted) return;
final String message = authenticated ? 'Authorized' : 'Not Authorized';
setState(() {
_authorized = message;
});
}
我想问的是..是否有可能建立一个使用指纹身份验证器的PWA项目?...因此,当用户从移动网络访问PWA时,他们可以使用用户指纹功能进行身份验证
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)