native_auth
此包用于实现 FaceID、TouchID 和指纹认证
使用此包,您可以使用 Android 和 iOS 设备的生物识别系统。
以下为英文项目原文快照,最新内容请访问 GitHub。
With this pack you can use the biometrics systems of Android and IOS devices.
import 'package:native_auth/native_auth.dart';
final response = await Auth.isAuthenticate();
print(response.isAuthenticated); // true or false
response is an enum AuthResult containing the statuses:
error, auth and noAuthauth means the user is authenticated.
noAuth means the user is no authenticated.
error means that it was not possible to request any biometrics.




Update your project's Info.plist file to include the
FaceID permissions:
<key>NSFaceIDUsageDescription</key>
<string>Why is my app authenticating using face id?</string>
Update your project's AndroidManifest.xml file to include the
USE_FINGERPRINT permissions:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app">
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<manifest>
Update your MainActivity.kt:
import io.flutter.embedding.android.FlutterFragmentActivity
class MainActivity: FlutterFragmentActivity() {
// ...
}
OR
Update your MainActivity.java:
import io.flutter.embedding.android.FlutterFragmentActivity;
public class MainActivity extends FlutterFragmentActivity {
// ...
}
to inherit FlutterActivity from FlutterFragmentActivity
Feito com ❤️ by Weliton Sousa
依赖清单 6 项
^2.1.6^1.1.1^1.0.21{"sdk":"flutter"}{"sdk":"flutter"}^2.0.0先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗