flutter_reprint

A plugin that allows you to use Reprint in Flutter apps.

Installing

To use this plugin, follow the steps below:

  1. add flutter_reprint as a dependency in your pubspec.yaml file.

  2. add Reprint as a dependency in your your_flutter_app_main_dir/android/app/build.gradle file:

dependencies {    
    (...) 
    implementation 'com.github.ajalt.reprint:core:3.3.2@aar'
} 
  1. Add Reprint.initialize(this) to your application class onCreate method:
class YourApplication : FlutterApplication() {    
    
 override fun onCreate() {   
     super.onCreate()  
     Reprint.initialize(this) }    
 } 

If you do not have an application class, you'll need to create one. Don't forget to add it to your AndroidManifest.xml file:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"    
 package="br.com.marcoporcho.my_app">    
   
 <application android:name=".application.YourApplication"   
 (...)  
 > 
  1. Add the USE_FINGEPRINT permission to your AndroidManifest.xml file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"    
 package="br.com.marcoporcho.my_app">    
<uses-permission android:name="android.permission.USE_FINGERPRINT" /> 

Getting Started

You can check out the example directory for a sample app using flutter_reprint.

For the impatient:

Check if the device has fingerprint hardware

 bool fingerprintReaderAvailable = await FlutterReprint.canCheckFingerprint;

Authenticate

 FlutterReprint.authenticateWithBiometrics().then((authResult) { 
	if(authResult.success) {
		 print('SUCCESS');
	} else {
	 print('FAIL');
	}
});

Stop authentication

 FlutterReprint.stopAuthentication().then((cancelOK) { 
	if(cancelOK) {
		 print('SUCCESS');
	} else {
	 print('FAIL');
	}
});

Libraries

authentication_failure_reason
authentication_result
flutter_reprint