A Flutter plugin to request the device unlock screen.

Overview

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.
}
Comments
  • Correct onActivityResult handling

    Correct onActivityResult handling

    The plugin shouldn't return true always, because another plugins won't be able to receive the onActivityResult callback.

    @felipeespitalher @rserro @rzdgodoy please accept the PR

    opened by askarsyzdykov 1
  • ios implementation for device unlock plugin

    ios implementation for device unlock plugin

    Eu tentei separar bem os commits pra visualizar a evolução, mas segue aqui também uma breve descrição do que foi feito.

    • Criada implementação para o DeviceUnlock.request no iOS;
    • Exceção DeviceUnlockUnavailable caso o device não tenha nenhum modo de autenticação local (incluindo passcode) - OBS: Eu criei uma custom exception mas sem implementação, eu ainda não estudei direito a parte de tratamento de exceção do Flutter;
    • Parâmetro obrigatório localizedReason que na prática é o subtítulo que é exibido pro usuário final no alerta do iOS quando ele pede o TouchID ou o Passcode;
    • Não explorei muito os testes unitários pq eu também ainda não estudei essa parte, mas criei um que valida a obrigatoriedade do localizedReason pro nosso método request;
    • Criação de um exemplo compatível com o nosso cenário de teste;

    Fico no aguardo do review de vocês.

    opened by rzdgodoy 0
  • Package conflict

    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)

    opened by swapnens 1
  • iPhone X - face ID absence

    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?

    opened by furaiev 2
  • getting Invalid Swift Support after Publishing iOS

    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.

    opened by GadepalliAditya1998 0
Owner
Cíngulo
Cíngulo
A simple slide-to-unlock widget for Flutter inspired by the Android Slide To Act.

Flutter Slide To Act A simple slide-to-unlock widget for Flutter inspired by the Android Slide To Act. Getting started Add slide_to_act to your pubspe

Salvatore Giordano 79 Dec 25, 2022
Find out what you did all the days and unlock moments you completely forgot!

This project has been replaced by Relieve Quid Faciam Hodie What did I do today? Find out what you did all these days and unlock moments you completel

null 10 Oct 27, 2022
Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.

Flutter permission_handler plugin The Flutter permission_handler plugin is build following the federated plugin architecture. A detailed explanation o

Baseflow 1.7k Dec 31, 2022
Unloc customizations of the Permission plugin for Flutter. This plugin provides an API to request and check permissions.

Flutter Permission handler Plugin A permissions plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check perm

Unloc 1 Nov 26, 2020
Doctor Consultation App in Flutter containing splash screen on boarding screen Routing state management Dash board Bottom navigation Decorated Drawer and Doctors Screen in the last.

Online doctor Consultation App UI in Flutter Doctor Consultation App UI in Flutter Visit Website Features State Management Navigation Bar Responsive D

Habib ullah 14 Jan 1, 2023
Android test task master - Create PIN code screen, authentication by PIN code screen and menu screen

Here is described test tasks for a android dev. Need to implement three screens:

null 3 Oct 4, 2022
Flutter plugin that allows you to keep the device screen awake on Android, iOS, macOS, Windows, and web.

Wakelock Wakelock is Flutter plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping. Supported platforms Platfo

null 341 Jan 4, 2023
A flutter plugin to query Android device Administrator (DevicePolicyManager) particulary Locking screen

device_policy_manager A flutter plugin to query Android device Administrator (DevicePolicyManager) particulary Locking screen for more info check Devi

Iheb Briki 4 Sep 29, 2022
SSH no ports provides ssh to a remote Linux device with out that device having any ports open

Ssh! No ports ssh no ports provides a way to ssh to a remote linux host/device without that device having any open ports (not even 22) on external int

The Atsign Foundation 224 Dec 21, 2022
A Flutter plugin for changing the Home Screen, Lock Screen (or both) Wallpaper on Android devices.

wallpaper_manager A Flutter plugin for changing the Home Screen, Lock Screen (or both) Wallpaper(s) on Android devices. Usage Installation In the pubs

Aditya Mulgundkar 38 Nov 28, 2022
Esizer - A Flutter package provide responsive, dynamic, configurable size for each device screen size

ESizer A Flutter package provide responsive, dynamic, configurable size for each

Extreme Vietnam Public 1 Feb 15, 2022
Http request inspector for Flutter application

Alice Alice is an HTTP Inspector tool for Flutter which helps debugging http requests. It catches and stores http requests and responses, which can be

Hau Tran 8 Dec 14, 2022
A powerful Http client for Dart, which supports Interceptors, FormData, Request Cancellation, File Downloading, Timeout etc.

dio_http A powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, Request Cancellation, File downloading, Timeout

null 46 Dec 19, 2021
Youtube API in Dart app. Used for downloading media and search request.

Youtube API Youtube API made by using Dart and Flutter in a cross-platform app. Used for downloading media and search request. For an idea of how the

Avian Silviu-Gabriel 0 Nov 4, 2021
A sample app of using the image_picker + path_provider and permission_handler package to request permission and store photos on mobile

image_picker_example A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you sta

iang12 4 Apr 19, 2022
A powerful Http client for Dart, which supports Interceptors, FormData, Request Cancellation, File Downloading, Timeout etc.

Language: English | 中文简体 dio A powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, Request Cancellation, File

Flutter中国开源项目 11.2k Jan 3, 2023
Hava Durumu Uygulaması - Temel Api Request

Hava Ne Durumda Bu uygulama temelde apilerle nasıl çalışılır, apiden veri nasıl GET edilir gibi işlemleri anlamak için yapılmıştır. Uygulama Fotoğrafl

Mehmet Ege Aydın 4 Jun 14, 2022
Simple and hackable request for dart

Simple and hackable request for dart

Thiago da Silva Teixeira 2 Sep 22, 2022
📖 A Guide for your first pull request

?? A Guide for your first pull request This project has been excluded by Hacktoberfest 2022 ✨ This project will help you to make your first pull reque

Dip Hire 27 Dec 2, 2022