Skip to content
pubscout

device_safety_info

1.6.0, released 9 days ago by therivanta.com

Provides root, jailbreak, debugger, screenshot, VPN and other security checks for Flutter apps.

$ flutter pub add device_safety_info
Source repository

What it does

Offers a set of native‑level detections (root/jailbreak, hooking, debugger, screen capture, overlay attacks, VPN, app‑store source, etc.) as Futures or Streams. The API is modular, letting you compose the signals into your own UI without bundled widgets.

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

Use it when

  • You need to detect device compromise or tampering on Android/iOS
  • You want a zero‑dependency security toolkit that returns raw data/streams
  • You require tiered risk levels for root or emulator detection

Skip it when

  • You need cross‑platform UI components for security (e.g., secure text fields)
  • Your app runs only on web or desktop where these checks aren’t applicable

Strengths

  • Comprehensive native security signals
  • No third‑party runtime dependencies
  • Tiered risk model for flexible policy
  • Provides both simple booleans and detailed results

Weaknesses

  • Limited to Android and iOS platforms
  • Requires native permissions and Gradle/Pod configuration
  • No built‑in UI widgets, you must implement your own

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
1

Add the plugin, request Android permissions (e.g., READ_EXTERNAL_STORAGE for root checks) and iOS entitlements if needed; no build_runner required.

import 'package:device_safety_info/device_safety_info.dart';

Future<void> checkSecurity() async {
  final isRooted = await DeviceSafetyInfo.isRooted();
  final isEmulator = await DeviceSafetyInfo.isEmulator();
  final isDebugger = await DeviceSafetyInfo.isDebuggerAttached;
  print('Rooted: $isRooted, Emulator: $isEmulator, Debugger: $isDebugger');
}

Alternatives

Packages that do the same job and could replace device_safety_info.

  • device_info_plus

    Provides basic device information without the extensive security checks, useful if you only need generic info

  • permission_handler

    Manages runtime permissions needed by security checks, can be used alongside or instead of this package for permission handling

Works with

Packages commonly used together with device_safety_info: ones it builds on, ones built on it, and its own family.