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

A Flutter plugin that monitors battery level and state changes natively for iOS and Android, notifying Flutter when a configurable threshold is reached or the battery state changes (charging, discharg [...]

130/ 160
pub points
95
downloads

We analyzed this package 4 days ago, and awarded it 130 pub points (of a possible 160):

Failed report section
Follow Dart file conventions
20 / 30trigger folding of the section

Failed check 0/10 points: Provide a valid pubspec.yaml

The package description is too long.

Search engines display only the first part of the description. Try to keep the value of the description field in your package's pubspec.yaml file between 60 and 180 characters.

Failed to verify repository URL.

pubspec.yaml from the repository URL mismatch: expected https://github.com/hoodi1/Battery-Monitoring but got https://github.com/your-org/battery_monitor.

Please provide a valid repository URL in pubspec.yaml, such that:

  • repository can be cloned,
  • a clone of the repository contains a pubspec.yaml, which:,
    • contains name: battery_monitor,
    • contains a version property, and,
    • does not contain a publish_to property.

Passed check 5/5 points: Provide a valid README.md

Passed check 5/5 points: Provide a valid CHANGELOG.md

Passed check 10/10 points: Use an OSI-approved license

Detected license: MIT.

Failed report section
Provide documentation
10 / 20trigger folding of the section

Passed check 10/10 points: 20% or more of the public API has dartdoc comments

17 out of 18 API elements (94.4 %) have documentation comments.

Some symbols that are missing documentation: battery_monitor.BatteryEvent.BatteryEvent.new.

Failed check 0/10 points: Package has an example

No example found.

See package layout guidelines on how to add an example.

Partially passed report section
Platform support
10 / 20trigger folding of the section

Partially passed check 10/20 points: Supports 2 of 6 possible platforms (iOS, Android, Web, Windows, macOS, Linux)

  • ✓ Android

  • ✓ iOS

These platforms are not supported:

Package does not support platform `Windows`.

Because:

  • package:battery_monitor/battery_monitor.dart that declares support for platforms: Android, iOS.
Package does not support platform `Linux`.

Because:

  • package:battery_monitor/battery_monitor.dart that declares support for platforms: Android, iOS.
Package does not support platform `macOS`.

Because:

  • package:battery_monitor/battery_monitor.dart that declares support for platforms: Android, iOS.
Package does not support platform `Web`.

Because:

  • package:battery_monitor/battery_monitor.dart that declares support for platforms: Android, iOS.

Swift Package Manager support:

Package does not support the Swift Package Manager on iOS

It does not contain ios/battery_monitor/Package.swift.

Note: This iOS or macOS plugin does not support the Swift Package Manager, resulting in a partial score. See https://docs.flutter.dev/to/spm for details.

Passed report section
Pass static analysis
50 / 50trigger folding of the section

Passed check 50/50 points: code has no errors, warnings, lints, or formatting issues

Passed report section
Support up-to-date dependencies
40 / 40trigger folding of the section

Passed check 10/10 points: All of the package dependencies are supported in the latest version

Package Constraint Compatible Latest Notes
plugin_platform_interface ^2.0.2 2.1.8 2.1.8
Transitive dependencies
Package Constraint Compatible Latest Notes
characters - 1.4.1 1.4.1
collection - 1.19.1 1.19.1
material_color_utilities - 0.13.0 0.13.0
meta - 1.17.0 1.18.1
vector_math - 2.2.0 2.2.0

To reproduce run dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides.

Passed check 10/10 points: Package supports latest stable Dart and Flutter SDKs

Passed check 20/20 points: Compatible with dependency constraint lower bounds

pub downgrade does not expose any static analysis error.

Analyzed with Pana 0.23.10, Flutter 3.41.2, Dart 3.11.0.

Check the analysis log for details.

Weekly downloads

Display as:
By versions:
4
likes
130
points
95
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin that monitors battery level and state changes natively for iOS and Android, notifying Flutter when a configurable threshold is reached or the battery state changes (charging, discharging, full).

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on battery_monitor

Packages that implement battery_monitor