appcare_flutter 1.4.1
appcare_flutter: ^1.4.1 copied to clipboard
An all-in-one Flutter utility package for app maintenance, upgrader dialogs, device info, battery, network diagnostics, biometrics, security, and hardware controls.
appcare_flutter #
An all-in-one, enterprise-grade Flutter utility package for app maintenance, auto-upgrader UI, hardware diagnostics, security anti-cheat checks, system controls, and native launchers — using RAW CODE ONLY.
Zero External Dependencies on the Dart/Flutter side. Pure performance using native Platform Channels and platform SDKs.
🌟 Key Highlights #
- 🚀 Zero External Dependencies: Lightweight and eliminates conflict with third-party packages.
- 📱 All-in-One Utility Suite: Replace 15+ standalone packages (
url_launcher,wakelock,upgrader,in_app_review,vibration,clipboard, etc.) with a single package. - 🛡️ Built-in Security & Anti-Cheat: Screenshot blocking, Fake GPS mock location detection, network auto-time verification, and screen recording detection.
- 🔊 System & Hardware Controls: Native flashlight, volume control, silent mode, app icon badging, biometrics check, and system audio beeps.
- 🌐 Network & Diagnostics: Server ping latency (ms), local IP discovery, Wi-Fi signal strength, battery status, disk storage space, and thermal diagnostics.
💻 Platform Support #
| Platform | Support | Notes |
|---|---|---|
| Android | ✅ | Native Kotlin SDK integration |
| iOS | ✅ | Native Swift with Swift Package Manager (SPM) |
| Web | ✅ | Pure Dart web plugin with browser APIs |
| macOS | ✅ | Dart desktop platform interface |
| Windows | ✅ | Dart desktop platform interface |
| Linux | ✅ | Dart desktop platform interface |
📋 Comprehensive Feature Overview & Code Examples #
1. 🌟 In-App Rating & Review #
Prompt users for store reviews with built-in cooldown logic to prevent spamming.
final appCare = AppCare();
// Request review (prompts only if minDaysBeforePrompt interval has passed)
bool prompted = await appCare.requestReview(minDaysBeforePrompt: 7);
// Reset prompt cooldown history
await appCare.resetReviewHistory();
2. 🆙 Automatic Upgrader UI Widgets #
Drop-in replacement for the upgrader package. Automatically prompts users when a new version is released.
// Wrap your root app with UpgradeAlert
void main() {
runApp(
const UpgradeAlert(
child: MyApp(),
),
);
}
// Or embed an UpgradeCard in Settings / Profile screens
const UpgradeCard(
elevation: 3,
title: 'New Update Available!',
)
3. 🔦 Flashlight / Torch Controller #
Direct camera flashlight control without external packages.
await appCare.turnFlashlightOn();
await appCare.turnFlashlightOff();
await appCare.toggleFlashlight();
4. 🛡️ Security & Anti-Cheat Helpers #
Protect your application from fake GPS, time tampering, screenshot leaks, and unauthorized screen recording.
// Check if user is using Fake GPS / Mock Location
bool isMock = await appCare.isMockLocation();
// Check if device time is automatically synced with network
bool isAutoTime = await appCare.isAutomaticTime();
// Check if app screen is currently being recorded or cast
bool isRecording = await appCare.isScreenBeingRecorded();
// Enable screenshot & screen recording block on sensitive screens
await appCare.setScreenSecurity(enable: true);
5. 🔊 System Volume & Silent Mode #
Read/set system media volume and check for ringer silent mode.
double currentVol = await appCare.getVolume(); // 0.0 to 1.0
await appCare.setVolume(0.7); // 70% volume
bool isMuted = await appCare.isMuted();
6. 📡 Network Diagnostics & Ping Latency #
Measure actual server ping response latency, inspect Wi-Fi signal strength, and retrieve local IP address.
// Ping server in ms (e.g. 15ms)
int latencyMs = await appCare.pingHost(host: '8.8.8.8');
// Get local IPv4 address
String? localIp = await appCare.getLocalIpAddress();
// Get Wi-Fi signal strength (0 to 4 bars)
int signalStrength = await appCare.getWifiSignalStrength();
// Check active internet connection
bool isOnline = await appCare.checkConnectivity();
// Detailed network type (wifi, cellular, ethernet, none)
NetworkType netType = await appCare.getNetworkType();
7. 🔐 Biometrics Hardware & App Icon Badge #
Check fingerprint / FaceID enrollment and set unread badge counts on the app icon.
// Biometrics hardware availability
bool canAuth = await appCare.canAuthenticateBiometrics();
// Set app icon unread badge count
await appCare.setAppBadgeCount(5);
await appCare.clearAppBadge();
8. 🔍 System Accessibility Font Scale & Beep #
Read user font scale factor for responsive layouts and trigger native system audio feedback.
double fontScale = await appCare.getFontScale(); // e.g., 1.0 or 1.5
await appCare.playSystemBeep();
9. 📲 External App Presence Check #
Verify if specific apps are installed on the device before attempting to launch them.
bool hasWhatsApp = await appCare.isAppInstalled('com.whatsapp');
10. 🌐 Native App & URL Launchers #
Launch URLs, emails, and phone dialer directly without requiring url_launcher.
await appCare.openUrl('https://www.rahulreza.com');
await appCare.openEmail('your-email@gmial.com', subject: 'Inquiry');
await appCare.openDialer('+8800000000000');
11. 💡 Keep Screen Awake (WakeLock) #
Keep device screen turned on during video playback or reading screens.
await appCare.setKeepScreenOn(keepOn: true);
12. 📳 Haptic Vibration Engine #
Trigger tactile feedback across multiple intensity presets.
await appCare.vibrate(type: HapticType.light);
await appCare.vibrate(type: HapticType.medium);
await appCare.vibrate(type: HapticType.heavy);
await appCare.vibrate(type: HapticType.success);
await appCare.vibrate(type: HapticType.error);
13. 📋 Clipboard & Screen Orientation Controls #
Copy and read system clipboard text, and lock screen orientation.
await appCare.copyToClipboard('Hello World!');
String? text = await appCare.getTextFromClipboard();
await appCare.setOrientation(ScreenOrientation.portrait);
await appCare.setOrientation(ScreenOrientation.landscape);
await appCare.setOrientation(ScreenOrientation.unlock);
14. 🌡️ Thermal & RAM Diagnostics #
Monitor RAM memory pressure and thermal overheating status.
bool lowRam = await appCare.isLowMemory();
ThermalStatus thermal = await appCare.getThermalStatus();
15. 🔋 Battery & Disk Storage Info #
Retrieve battery level percentage, charging state, low power mode, and free/total storage capacity.
BatteryInfo battery = await appCare.getBatteryInfo();
print('Battery: ${battery.batteryLevel}% (Charging: ${battery.isCharging})');
StorageInfo storage = await appCare.getStorageInfo();
print('Free storage: ${storage.freeGB.toStringAsFixed(2)} GB / ${storage.totalGB.toStringAsFixed(2)} GB');
⚙️ 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 #
For location features, add NSLocationWhenInUseUsageDescription to ios/Runner/Info.plist:
<key>NSLocationWhenInUseUsageDescription</key>
<string>We need your location for app features.</string>
👨💻 Author & Maintainer #
Md. Rahul Reza
- 🔗 Website: rahulreza.com
- 📬 Email: contact@rahulreza.com
📄 License #
This project is licensed under the MIT License.