Documentation is under contruction.
Flutter plugin which lets you to generate key pair and do cryptographic signing using biometric authentication.
Heavily influenced by local_auth
Currently only supported for Android
Usage in Dart
Import the relevant file:
bool authAvailable = await FlutterBiometrics().authAvailable();
List<BiometricType> getAvailableBiometricTypes = await FlutterBiometrics().getAvailableBiometricTypes();
String publicKeyAsBase64 = await FlutterBiometrics().createKeys(reason: 'Please authenticate to generate keys');
bool signedPayloadAsBase64 = await FlutterBiometrics().sign(payload: 'base64string', reason: 'Please authenticate to sign payload');
Android Integration (taken from local_auth)
Note that local_auth plugin requires the use of a FragmentActivity as
opposed to Activity. This can be easily done by switching to use
FlutterFragmentActivity as opposed to
FlutterActivity in your
manifest (or your own Activity class if you are extending the base class).
Update your project's
AndroidManifest.xml file to include the
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.app"> <uses-permission android:name="android.permission.USE_FINGERPRINT"/> <manifest>
For help getting started with Flutter, view Flutter online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
- Foreign Function Interface for interoperability with the C programming language. [...]
- HTML elements and other resources for web-based applications that need to interact with the browser and the DOM (Document Object Model). [...]
- Utility methods to efficiently manipulate typed JSInterop objects in cases where the name to call is not known at runtime. You should only use these methods when the same effect cannot be achieved with @JS annotations. These methods would be extension methods on JSObject if Dart supported extension methods.