Code Monkey home page Code Monkey logo

device_unlock's Introduction

device_unlock

A Flutter plugin to request the device unlock screen on Android and iOS.

How does it work

The following attempts and fallbacks are made:

  1. Is face unlock available? Request and return true if user passed validation or false otherwise.
  2. Is touch unlock available? Request and return true if user passed validation or false otherwise.
  3. Is pin unlock available? Request and return true if user passed validation or false otherwise.
  4. If the device does not have face, touch or pin security, throw an exception and let the dev decide what to do.

Sample code

import 'package:device_unlock/device_unlock.dart';

try {
    if (await DeviceUnlock.request(localizedReason: "We need to check your identity.")) {
        // Unlocked successfully.
    } else {
        // Did not pass face, touch or pin validation.
    }
} on RequestInProgress {
    // A new request was sent before the first one finishes
} on DeviceUnlockUnavailable {
    // Device does not have face, touch or pin security available.
}

device_unlock's People

Contributors

askarsyzdykov avatar felipeespitalher avatar rserro avatar rzdgodoy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

device_unlock's Issues

Package conflict

This package does not work with flutter_local_notification package.

If we use this package and then use any function from flutter_local_notification, I get the following error.
I/flutter ( 6490): MissingPluginException(No implementation found for method show on channel dexterous.com/flutter/local_notifications)

iPhone X - face ID absence

Hi, thank you for your package.
It works smoothly on iPhone 7 - fingerprint but on iPhone X it proposes to enter a pin, not a face ID.
How can I resolve the issue?

getting Invalid Swift Support after Publishing iOS

Hey i used your plugin and made some changes to the methods like Open setting which will Open up the settings in android. When i tried to integrate the plugin in my application, it said swift version not found. Then i searched for it and added s.swiftVersions = [4.0,4.2,5.1] and my build was succeded.

Now when I try to upload to the app store, i get saying:

The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it.

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.