appcare_flutter 1.0.2 copy "appcare_flutter: ^1.0.2" to clipboard
appcare_flutter: ^1.0.2 copied to clipboard

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

appcare_flutter #

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

Zero External Dependencies (on Dart/Flutter side). Pure logic using Platform Channels and standard SDKs.

Features #

  • App Rating & Review: Native in-app review prompt with smart cooldown logic.
  • App Update Checker: Check for updates automatically (Google Play / iTunes).
  • Internet Connectivity: Real-time stream of internet status.
  • App & Device Info: Get detailed package (version, build, install time) and device (model, OS) information.
  • Geo Location: Get latitude/longitude using native APIs (LocationManager/CoreLocation).

Installation #

Add appcare_flutter as a dependency in your pubspec.yaml file.

dependencies:
  appcare_flutter: ^1.0.0

Platform Setup #

Android #

Zero Configuration Required: The package automatically includes the necessary permissions in its manifest, which are merged into your app.

  • INTERNET
  • ACCESS_NETWORK_STATE
  • ACCESS_FINE_LOCATION (for Location feature)
  • ACCESS_COARSE_LOCATION

iOS #

For Location features, you must add keys to Info.plist:

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

For App Info, standard bundle keys are used automatically.

Usage #

Import the package:

import 'package:appcare_flutter/appcare_flutter.dart';

Initialize AppCare #

final appCare = AppCare();

Request In-App Review #

Request a review with a cooldown safety check (default 7 days).

// Only prompts if 7 days have passed since the last prompt
// and native conditions are met.
bool launched = await appCare.requestReview(minDaysBeforePrompt: 7);

Check for Updates #

Zero Configuration:

  • Android: Checks Google Play Store via In-App Updates API.
  • iOS: Checks iTunes Search API.
final updateInfo = await appCare.checkForUpdate();

if (updateInfo.updateAvailable) {
  print('New version available: ${updateInfo.remoteVersion}');
  
  // Start the update flow:
  // Android: Shows native In-App Update UI (Immediate/Flexible).
  // iOS: Opens the App Store page.
  appCare.startUpdate(); 
}

Check Connectivity #

Listen to real-time status changes:

appCare.onConnectivityChanged.listen((isConnected) {
  print(isConnected ? "Online" : "Offline");
});

One-time check (verifies actual internet access):

bool hasInternet = await appCare.checkConnectivity();

App & Device Info #

Get details about the running app and the device it's on without external packages.

// Detailed App Info
final appInfo = await appCare.getAppBaseInfo();
print('Version: ${appInfo.version} (${appInfo.buildNumber})');
print('Install Time: ${appInfo.installTime}');

// Device Info
final device = await appCare.getDeviceInfo();
print('${device.manufacturer} ${device.model} running ${device.osName} ${device.osVersion}');

Geo Location #

Get the current location (handles permission requests automatically on Android).

final location = await appCare.getCurrentLocation();
if (location != null) {
  print('Lat: ${location.latitude}, Lng: ${location.longitude}');
}

👨‍💻 Author #

Md. Rahul Reza 🔗 rahulreza.com 📬 contact@rahulreza.com

6
likes
160
points
201
downloads

Publisher

verified publisherrahulreza.com

Weekly Downloads

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

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on appcare_flutter

Packages that implement appcare_flutter