flutter_biometrics 0.3.0 copy "flutter_biometrics: ^0.3.0" to clipboard
flutter_biometrics: ^0.3.0 copied to clipboard

Flutter plugin which lets you to generate key pair and do cryptographic signing using biometric authentication.

flutter_biometrics #

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

Usage in Dart #

Import the relevant file:

import 'package:flutter_biometrics/flutter_biometrics.dart';

Available methods:

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 USE_FINGERPRINT permissions:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.example.app">
  <uses-permission android:name="android.permission.USE_FINGERPRINT"/>
<manifest>

Getting Started #

For help getting started with Flutter, view Flutter online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

17
likes
110
pub points
73%
popularity

Publisher

unverified uploader

Flutter plugin which lets you to generate key pair and do cryptographic signing using biometric authentication.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, meta

More

Packages that depend on flutter_biometrics