πŸ›‘οΈ lifecycle_guard

The bulletproof Flutter plugin for mission-critical background execution.

Stop losing data when Android or iOS aggressively kills your app. lifecycle_guard ensures your background tasks survive termination, system reboots, and battery optimizations β€” guaranteed.

GitHub pub version License: BSD-3 Flutter Platform


🎬 Demo

lifecycle_guard Demo

Watch lifecycle_guard in action: App swipe β†’ Background survival β†’ Task completion.


✨ Features

Feature Description
πŸ›‘οΈ Isolate Protection Boots a lightweight secondary engine so your task never shares the UI thread fate
πŸ€– Android 15+ Ready Fully compliant with new foregroundServiceType: dataSync requirements
🍎 iOS Compatible Bridges to Apple's native background task scheduler
πŸ“‘ Zero Data Loss Tasks continue even when users swipe the app away
⚑ 30-Second Setup One-line API β€” no complex native configuration needed

πŸš€ Quick Start

Installation

Add to your pubspec.yaml:

dependencies:
  lifecycle_guard: ^0.0.1

Usage

import 'package:lifecycle_guard/lifecycle_guard.dart';

// Trigger a mission-critical background task
await LifecycleGuard.runSecureTask(
  id: "sync_user_data",
  payload: {"userId": "12345"},
);

🧠 How It Works

lifecycle_guard uses a federated architecture to boot a native protected service (Android Foreground Service or iOS Background Task) that runs independently of your app's UI lifecycle.

Full technical details and architecture diagrams at GitHub.


πŸ“„ License

BSD 3-Clause License β€” see LICENSE for details.


Built with ❀️ by Crealify · Open to collaborate · PRs welcome

Libraries

lifecycle_guard