Skip to content
pubscout

is_device_secure

2.0.2, released 11 months ago by nirmanait.com

Checks whether the mobile device has a secure lock screen setup like a PIN, pattern, password, or biometrics.

WASM-ready
$ flutter pub add is_device_secure
Source repository

What it does

A Flutter plugin for Android and iOS that checks if the device enforces basic security measures like a secure lock screen. It exposes a simple asynchronous property to query device security status.

AI-written summary of version 2.0.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a banking, payment, or enterprise app that requires basic device security enforcement.
  • You want to warn users or block access if their device lacks a lock screen or passcode.

Skip it when

  • You need to authenticate the user's identity via biometrics for a specific action (use local_auth instead).
  • You are targeting web, desktop, or platforms other than Android and iOS.

Strengths

  • Lightweight and straightforward API.
  • Helps enforce security compliance for sensitive applications.

Weaknesses

  • Limited platform support (Android and iOS only).
  • Only checks if a lock screen exists, not who is unlocking or specific biometric validation.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
0

No extra native setup or permissions documented.

final isSecure = await IsDeviceSecure.secure;
print("Is device secure: $isSecure");

Alternatives

Packages that do the same job and could replace is_device_secure.

  • local_auth

    If you need local biometric authentication rather than just checking if the device has a secure lock screen setup.