flutter_biometrics 0.1.0

Flutter Android iOS

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

Currently only supported for Android #

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.

1
likes
90
pub points
19%
popularity

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

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

lukas@travelunion.eu

License

MIT (LICENSE)

Dependencies

flutter, meta

More

Packages that depend on flutter_biometrics