πŸ” 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!