Flutter security package · Open source
app_armor
آب آرمر
All-in-one mobile security for Flutter, with one call in main().
- My role
- Author and maintainer: API design, Dart package, native Android (Kotlin) and iOS (Swift) plugin code, docs and pub.dev releases.
- Platforms
- iOS · Android
- Status
- Live on pub.dev · v0.1.1
Screens
Scroll the screens ↔




The problem
Securing a Flutter app for a bank or a fintech review usually means wiring up five or six packages: one for root and jailbreak detection, one for secure storage, one for SSL pinning, one to block screenshots, plus hand-written code for the blocked screen, session timeouts and log cleanup. Each has its own setup, and the gaps between them are where audits fail. app_armor puts all of it behind one call, with a policy you control for every threat.
What it does
- Runtime protection (RASP): detects Frida and other hooking tools, debuggers, root/jailbreak, emulators, re-signed or modified apps, unofficial stores and 16 more threats.
- A block, warn or ignore action for every threat, with recommended, strict and monitor-only presets.
- A clear blocked screen in Arabic or English that shows the reason. Restyle it or replace it with your own.
- Screen privacy: app-switcher blur or blank card, screenshot blocking for the whole app or chosen screens, a cover while the screen is recorded, and tapjacking protection.
- ArmorVault: Keychain/Keystore storage that stays on the device, clears on reinstall and moves old plain-text values in.
- ArmorPinning: public key (SPKI) or certificate pinning for Dio.
- Log redaction for passwords, tokens, JWTs and card numbers, and silent logs in release builds.
- Session timeout after inactivity or time in the background, and a clipboard that clears copied OTPs and IBANs.
- A command, dart run app_armor, that hardens Android settings and checks your release build.
Under the hood
01
One call, safe defaults
AppArmor.run initializes Flutter, starts every enabled feature, silences release logs and wraps the app in a gate that shows the checking badge and the blocked screen. Teams that keep their own main() use AppArmor.init and AppArmor.builder() instead, so it fits MaterialApp and GetMaterialApp alike.
02
Measure before you block
Every threat maps to block, warn or ignore. The monitor-only preset never blocks, so a team can see how many real users would be affected before switching blocking on. Warnings reach the app as a status stream, so it can, for example, disable payments on a rooted device without locking the whole app.
03
Built on a proven engine
Runtime detection is powered by freeRASP by Talsec, a maintained engine for hooking, tamper and root checks. app_armor adds what apps actually need around it: the policy layer, the bilingual UI, secure storage, pinning, screen privacy and session control.
04
Honest about limits
Runtime checks make attacks harder and more expensive, not impossible, so the docs say to keep secrets and business rules on the server. iOS can't block screenshots, so the package detects them and covers the app while the screen is recorded instead.
Tech stack
- Flutter
- Dart
- Kotlin
- Swift
- freeRASP
- Keychain / Keystore
- SSL pinning
- Dio
- iOS
- Android