🚀 appcare_flutter

The Ultimate All-in-One Enterprise Flutter Utility & App Maintenance Suite

Replace 15+ standalone packages with a single, ultra-lightweight, zero-Dart-dependency native plugin.

pub package pub points pub popularity license WASM Ready


Android iOS Web macOS Windows Linux


📖 Table of Contents


🌟 Why appcare_flutter?

Building modern Flutter applications often requires installing dozens of third-party dependencies — causing dependency hell, version conflicts, larger app bundle size, and build incompatibilities with new Flutter/Gradle/Xcode releases.

appcare_flutter unifies all essential device utilities into a single, clean, enterprise-ready package:

Feature Category Traditional Multi-Package Stack With appcare_flutter
App Maintenance & Upgrader upgrader Built-in (UpgradeAlert, UpgradeCard)
In-App Store Review in_app_review Built-in (requestReview with cooldown)
Native App & URL Launchers url_launcher Built-in (openUrl, openEmail, openDialer)
Screen WakeLock wakelock_plus Built-in (setKeepScreenOn)
Haptic Feedback vibration Built-in (vibrate)
Clipboard Management clipboard Built-in (copyToClipboard, getText)
Screen Security Guard screen_protector Built-in (setScreenSecurity)
Battery Information battery_plus Built-in (getBatteryInfo)
Network & Connectivity connectivity_plus Built-in (checkConnectivity, pingHost)
App & Device Info device_info_plus + package_info_plus Built-in (getDeviceInfo, getAppBaseInfo)
Anti-Cheat / Security Multiple custom plugins Built-in (Fake GPS, screen record, time sync)
Flashlight / Torch torch_light Built-in (toggleFlashlight)
App Icon Badge flutter_app_badger Built-in (setAppBadgeCount)

💻 Platform Support Matrix

Platform Support WASM Ready Implementation
Android ✅ Full N/A Modern Kotlin (AGP 9+ built-in Kotlin)
iOS ✅ Full N/A Swift with Swift Package Manager (SPM)
Web ✅ Full Yes Pure Dart SDK dart:js_interop (Zero External Packages)
macOS ✅ Full N/A Pure Dart Desktop Platform Interface
Windows ✅ Full N/A Pure Dart Desktop Platform Interface
Linux ✅ Full N/A Pure Dart Desktop Platform Interface

📦 Installation

Add appcare_flutter to your pubspec.yaml:

flutter pub add appcare_flutter

Or manually in pubspec.yaml:

dependencies:
  appcare_flutter: ^2.0.0

Import it in your Dart code:

import 'package:appcare_flutter/appcare_flutter.dart';

🚀 Quick Start

import 'package:flutter/material.dart';
import 'package:appcare_flutter/appcare_flutter.dart';

void main() {
  runApp(
    // Wrap with UpgradeAlert to automatically check and prompt for updates
    const UpgradeAlert(
      child: MyApp(),
    ),
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: HomeScreen(),
    );
  }
}

class HomeScreen extends StatelessWidget {
  const HomeScreen({super.key});

  @override
  Widget build(BuildContext context) {
    final appCare = AppCare();

    return Scaffold(
      appBar: AppBar(title: const Text('AppCare Flutter Demo')),
      body: Center(
        child: ElevatedButton.icon(
          onPressed: () async {
            // Trigger haptic feedback
            await appCare.vibrate(type: HapticType.success);
            
            // Check battery info
            final battery = await appCare.getBatteryInfo();
            print('Battery level: ${battery.batteryLevel}%');
          },
          icon: const Icon(Icons.touch_app),
          label: const Text('Test AppCare'),
        ),
      ),
    );
  }
}

📚 Comprehensive Feature Guide

1. 🆙 Auto-Upgrader UI Widgets

Drop-in replacement for the upgrader package with customizable dialog styles, ignore persistence, and card embeddings.

Dialog Wrapper (UpgradeAlert):

void main() {
  runApp(
    const UpgradeAlert(
      dialogStyle: UpgradeDialogStyle.cupertino, // or UpgradeDialogStyle.material
      showLater: true,
      showIgnore: true,
      title: 'Update Available!',
      updateButtonText: 'Update Now',
      child: MyApp(),
    ),
  );
}

Settings / Profile Card (UpgradeCard):

// Embed inside any Settings or Profile list
const UpgradeCard(
  margin: EdgeInsets.all(16),
  elevation: 2,
  title: 'Check for Updates',
)

2. 🌟 In-App Rating & Review

Prompt users for App Store / Play Store rating with built-in cooldown logic to prevent nagging users too frequently.

final appCare = AppCare();

// Request review (only triggers if 7 days have passed since the last prompt)
bool prompted = await appCare.requestReview(minDaysBeforePrompt: 7);

// Reset review cooldown history (e.g., for testing or debug menus)
await appCare.resetReviewHistory();

// Directly open store listing
await appCare.openStore();

3. 🛡️ Security & Anti-Cheat Protection

Protect your apps against GPS spoofing, time manipulation, screenshot leaks, and unauthorized screen recording:

final appCare = AppCare();

// Detect Fake GPS / Mock Location provider
bool isMock = await appCare.isMockLocation();

// Verify that device time is synced with network time (prevents clock tampering)
bool isAutoTime = await appCare.isAutomaticTime();

// Detect if device screen is currently being recorded or cast
bool isRecording = await appCare.isScreenBeingRecorded();

// Block screenshots and screen recording on sensitive screens (e.g., payment, KYC)
await appCare.setScreenSecurity(enable: true);

4. 🔦 Flashlight / Torch Controller

Direct native camera torch control without requiring external camera packages:

final appCare = AppCare();

// Turn flashlight on
await appCare.turnFlashlightOn();

// Turn flashlight off
await appCare.turnFlashlightOff();

// Toggle flashlight state
await appCare.toggleFlashlight();

5. 🔊 System Volume & Silent Mode

Read and control system media volume and check for ringer silent mode:

final appCare = AppCare();

// Get system volume (range: 0.0 to 1.0)
double volume = await appCare.getVolume();

// Set system volume (e.g. 80%)
await appCare.setVolume(0.8);

// Check if device is muted / Do Not Disturb
bool isMuted = await appCare.isMuted();

// Play native system audio feedback beep
await appCare.playSystemBeep();

6. 📡 Network Diagnostics & Ping Latency

Measure real-time server ping latency, inspect Wi-Fi RSSI signal strength, and retrieve local IP addresses:

final appCare = AppCare();

// Ping server in milliseconds (e.g. 18 ms)
int latencyMs = await appCare.pingHost(host: '8.8.8.8');

// Retrieve device local IPv4 address
String? localIp = await appCare.getLocalIpAddress();

// Get Wi-Fi signal strength level (0 to 4 scale)
int wifiBars = await appCare.getWifiSignalStrength();

// Check active internet connection status
bool isConnected = await appCare.checkConnectivity();

// Detailed network type (NetworkType.wifi, cellular, ethernet, none)
NetworkType type = await appCare.getNetworkType();

// Listen to real-time connectivity changes
appCare.onConnectivityChanged.listen((bool isOnline) {
  print('Internet status changed: $isOnline');
});

7. 🔐 Biometrics & App Icon Badging

Inspect biometric hardware security and set unread badge counts on the app launcher icon:

final appCare = AppCare();

// Check if Fingerprint / Face ID is supported and enrolled
bool canBiometrics = await appCare.canAuthenticateBiometrics();

// Set app icon unread badge count
await appCare.setAppBadgeCount(5);

// Clear app icon badge
await appCare.clearAppBadge();

8. 📳 Haptic Engine, Clipboard & Screen Orientation

final appCare = AppCare();

// Tactile Haptic Vibration Feedback
await appCare.vibrate(type: HapticType.light);
await appCare.vibrate(type: HapticType.medium);
await appCare.vibrate(type: HapticType.heavy);
await appCare.vibrate(type: HapticType.selection);
await appCare.vibrate(type: HapticType.success);
await appCare.vibrate(type: HapticType.error);

// Clipboard Management
await appCare.copyToClipboard('Copied from AppCare!');
String? text = await appCare.getTextFromClipboard();

// Screen Orientation Controls
await appCare.setOrientation(ScreenOrientation.portrait);
await appCare.setOrientation(ScreenOrientation.landscape);
await appCare.setOrientation(ScreenOrientation.unlock);

// Keep Screen Awake (WakeLock)
await appCare.setKeepScreenOn(keepOn: true);

// Accessibility Font Scale & Dark Mode
double fontScale = await appCare.getFontScale(); // e.g. 1.0 or 1.5
bool isDark = await appCare.isDarkMode();

9. 🔋 Battery, Storage & System Diagnostics

final appCare = AppCare();

// Battery Diagnostics
BatteryInfo battery = await appCare.getBatteryInfo();
print('Level: ${battery.batteryLevel}%, Charging: ${battery.isCharging}, PowerSaver: ${battery.isPowerSaveMode}');

// Disk Storage Space
StorageInfo storage = await appCare.getStorageInfo();
print('Free: ${storage.freeGB.toStringAsFixed(2)} GB / Total: ${storage.totalGB.toStringAsFixed(2)} GB');

// RAM & Thermal Monitoring
bool lowMem = await appCare.isLowMemory();
ThermalStatus thermal = await appCare.getThermalStatus();

// App Launch & Lifecycle Tracking
AppLaunchInfo launch = await appCare.getAppLaunchInfo();
print('First Launch: ${launch.isFirstLaunch}, Post Update: ${launch.isFirstLaunchAfterUpdate}, Uptime: ${launch.sessionUptimeSeconds}s');

// Device & Hardware Info
DeviceInfo device = await appCare.getDeviceInfo();
AppBaseInfo appInfo = await appCare.getAppBaseInfo();

10. 🌐 Native Launchers (URL, Email, Dialer)

Launch URLs, email compositions, and phone dialers without needing url_launcher:

final appCare = AppCare();

// Open Web URL or Deep Link
await appCare.openUrl('https://www.rahulreza.com');

// Open Email client with predefined subject
await appCare.openEmail('support@rahulreza.com', subject: 'Customer Support');

// Open Phone dialer
await appCare.openDialer('+8801700000000');

// Check if external app is installed (e.g. WhatsApp, Telegram)
bool hasWhatsApp = await appCare.isAppInstalled('com.whatsapp');

⚙️ Platform Setup

Android Setup

Permissions are automatically merged by the plugin's AndroidManifest.xml:

<uses-permission android.permission.INTERNET />
<uses-permission android.permission.ACCESS_NETWORK_STATE />
<uses-permission android.permission.ACCESS_FINE_LOCATION />
<uses-permission android.permission.ACCESS_COARSE_LOCATION />

iOS Setup

If using location features, add NSLocationWhenInUseUsageDescription to ios/Runner/Info.plist:

<key>NSLocationWhenInUseUsageDescription</key>
<string>We need your location for app diagnostic features.</string>

Web & WASM Setup

No additional setup needed! appcare_flutter is 100% WASM-ready and compiled using modern web standards.


👨‍💻 Author & Maintainer

Md. Rahul Reza


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Libraries

appcare_flutter
An all-in-one Flutter utility package for app maintenance and user engagement using RAW CODE ONLY.