๐Ÿ” zeba_academy_local_security

A production-ready Flutter package for offline app protection, providing essential security features like screenshot detection, screen recording protection, app lock, and background privacy handling.


โœจ Features

  • ๐Ÿ“ธ Screenshot Detection (Android)
  • ๐ŸŽฅ Screen Recording Protection (via FLAG_SECURE)
  • ๐Ÿ”’ App Lock (Biometric / Device Authentication)
  • ๐Ÿ›‘ Background Protection (Hide sensitive UI when app is minimized)
  • โšก Lightweight & Easy Integration

๐Ÿ“ฆ Installation

Add this to your pubspec.yaml:

dependencies:
  zeba_academy_local_security: ^0.0.1

Then run:

flutter pub get

๐Ÿš€ Usage

1. Import Package

import 'package:zeba_academy_local_security/zeba_academy_local_security.dart';

2. Enable Security Manager

final security = SecurityManager();

@override
void initState() {
  super.initState();

  security.enableSecure();
  security.startScreenshotListener();

  security.onScreenshot.listen((event) {
    debugPrint("Screenshot detected!");
  });
}

3. App Lock (Biometric / PIN fallback)

bool unlocked = await AppLock.authenticate();

if (unlocked) {
  print("Access granted");
}

4. Background Protection

Wrap your app:

BackgroundProtection(
  child: MaterialApp(
    home: HomePage(),
  ),
);

โš™๏ธ Platform Support

Feature Android iOS
Screenshot Detection โœ… โŒ
Screen Recording Protection โœ… โš ๏ธ Limited
App Lock โœ… โœ…
Background Protection โœ… โœ…

โš ๏ธ Important Notes

  • iOS has strict limitations on detecting screenshots and screen recordings.
  • Use FLAG_SECURE for maximum protection on Android.
  • This package focuses on offline-first security.

๐Ÿงช Testing

Run tests using:

flutter test

๐Ÿ“ Project Structure

lib/
 โ”œโ”€โ”€ zeba_academy_local_security.dart
 โ””โ”€โ”€ src/
     โ”œโ”€โ”€ security_manager.dart
     โ”œโ”€โ”€ app_lock.dart
     โ””โ”€โ”€ background_protection.dart

๐Ÿค Contributing

Contributions are welcome! Feel free to open issues and submit pull requests.


About Me

โœจ Iโ€™m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at sufyanism.com or connect with me on Linkedin

Your all-in-one no-bloat hub!

๐Ÿš€ Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! ๐Ÿ’ปโœจ

Zeba Academy is a learning platform dedicated to coding, technology, and development. โžก Visit our main site: zeba.academy
โžก Explore hands-on courses and resources at: code.zeba.academy
โžก Check out our YouTube for more tutorials: zeba.academy
โžก Follow us on Instagram: zeba.academy

Thank you for visiting!