duraspeed_checker 0.0.1 copy "duraspeed_checker: ^0.0.1" to clipboard
duraspeed_checker: ^0.0.1 copied to clipboard

PlatformAndroid

A Flutter plugin for Android to detect the presence and status of DuraSpeed

DuraSpeed Checker #

A Flutter plugin for Android to detect the presence and status of DuraSpeed, a battery optimization feature on some MediaTek-based devices (e.g., Oppo, Vivo, Tecno).

Features #

  • Checks if DuraSpeed exists on the device.
  • Attempts to detect if DuraSpeed is active (based on running services).
  • Retrieves the Android OS version.

Installation #

Add to your pubspec.yaml:

dependencies:
  duraspeed_checker: ^0.1.0

Run flutter pub get.

Usage #

import 'package:duraspeed_checker/duraspeed_checker.dart';

void checkDuraSpeed() async {
  final checker = DuraspeedChecker();

  // Get Android version
  final version = await checker.getPlatformVersion();
  print("Version: $version"); // "Android 13" or null if not Android

  // Check if DuraSpeed exists
  final exists = await checker.checkDuraSpeed();
  print("Exists: $exists"); // true if found, false if not or not Android

  // Check if DuraSpeed is enabled
  final enabled = await checker.isDuraSpeedEnabled();
  print("Enabled: $enabled"); // true if active, false if not or not Android
}

Limitations #

  • Android-only, returns safe defaults (null or false) on other platforms.
  • isDuraSpeedEnabled may be inconsistent due to varying DuraSpeed implementations.
0
likes
150
points
20
downloads

Publisher

verified publishershaykisten.com

Weekly Downloads

A Flutter plugin for Android to detect the presence and status of DuraSpeed

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on duraspeed_checker

Packages that implement duraspeed_checker