GithubHelp home page GithubHelp logo

maporcho / flutter_reprint Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 77 KB

A plugin to use Reprint in Flutter apps.

License: Apache License 2.0

Kotlin 31.49% Swift 5.40% Objective-C 4.26% Dart 45.69% Ruby 13.15%

flutter_reprint's Introduction

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');
   }
});

flutter_reprint's People

Contributors

batcha avatar maporcho avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

batcha

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.