Skip to content

Latest commit

Β 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Battery Health Checker

Battery Health Checker

A beautiful, open-source Windows desktop app to monitor your laptop battery health.

Flutter Dart License Release

PayPal Ko-fi

---

✨ Features

Feature Description
🎨 New UI A beautiful, modern user interface with smooth animations and intuitive navigation.
πŸ”‹ Real-time Monitoring Live battery level, charging state, and health percentage
πŸ“Š Health Analysis Design vs. full-charge capacity comparison with color-coded status
πŸ”” Smart Alerts Configurable low/high battery notifications via Windows toast
πŸ–₯️ System Tray Minimize to tray to keep monitoring in the background
πŸš€ Start with Windows Auto-launch at login via the Windows Registry
🌍 Multi-language English, Arabic, and Spanish
🎨 Themes Light, dark, and system-follow modes
πŸ”„ Auto-update Check Checks GitHub Releases for new versions on startup

πŸ“Έ Screenshots

Screenshot

πŸ—οΈ Architecture

The project follows a clean architecture pattern with clear separation of concerns:

lib/
β”œβ”€β”€ core/               # Shared utilities, themes, services, constants
β”‚   β”œβ”€β”€ constants/      # App-wide colors (AppColors) and constants
β”‚   β”œβ”€β”€ l10n/           # Localization strings (EN, AR, ES)
β”‚   β”œβ”€β”€ services/       # Tray, notification, startup, and update services
β”‚   β”œβ”€β”€ theme/          # Light/dark theme definitions & ThemeProvider
β”‚   β”œβ”€β”€ utils/          # Battery utility helpers
β”‚   └── widgets/        # Reusable widgets (GlassCard, AppErrorWidget)
β”œβ”€β”€ data/               # Data layer
β”‚   β”œβ”€β”€ datasources/    # Windows battery data source (powercfg parser)
β”‚   └── repositories/   # Repository implementations (Battery, Settings)
β”œβ”€β”€ domain/             # Domain layer
β”‚   β”œβ”€β”€ entities/       # BatteryInfo entity
β”‚   └── repositories/   # Abstract repository interfaces
β”œβ”€β”€ presentation/       # UI layer
β”‚   β”œβ”€β”€ pages/          # Screens (Battery, Alerts, Settings)
β”‚   β”œβ”€β”€ providers/      # ChangeNotifier state (Battery, Alerts, Update)
β”‚   └── widgets/        # UI components (WaveBatteryIndicator, DonateMenu, etc.)
└── main.dart           # App entry point and window setup

Key Design Decisions

  • State Management: Built-in Flutter ChangeNotifier + ListenableBuilder β€” no third-party state packages.
  • Battery Data: Uses powercfg /batteryreport to generate an HTML report, then parses it with the html package to extract health data.
  • Design System: All colors are centralized in app_colors.dart for easy theming.
  • Typography: Uses bundled Noto Sans Arabic fonts for multi-script support (Latin + Arabic) without runtime network requests.
  • Update Checking: Queries the GitHub Releases API on startup and notifies the user if a newer version is available.
  • Window Management: Dynamic window height (70% of screen height, clamped to 600 px) adapts to different displays and DPI scaling.
  • Background Optimization: Animations are paused via TickerMode when the window is minimized or hidden to reduce CPU usage.

πŸš€ Getting Started

Prerequisites

  • Flutter SDK 3.41+ (stable channel)
  • Dart SDK 3.11+
  • Windows 10/11 with a laptop battery
  • Git for cloning the repository

Option 1: Using Flutter directly

# 1. Clone the repository
git clone https://github.com/LotfiBoukhemerra/Battery-Health-Checker-App.git
cd Battery-Health-Checker-App

# 2. Install dependencies
flutter pub get

# 3. Run in debug mode
flutter run -d windows

# 4. Build a release executable
flutter build windows --release

The release build will be located at:

build/windows/x64/runner/Release/

Option 2: Using FVM (Flutter Version Management)

If you manage multiple Flutter versions with FVM:

# 1. Install FVM (if not already installed)
dart pub global activate fvm

# 2. Clone and enter the project
git clone https://github.com/LotfiBoukhemerra/Battery-Health-Checker-App.git
cd Battery-Health-Checker-App

# 3. Install the required Flutter version
fvm install 3.41.7
fvm use 3.41.7

# 4. Install dependencies and run
fvm flutter pub get
fvm flutter run -d windows

Option 3: Using Puro

Puro is a blazing-fast Flutter version manager:

# 1. Install Puro
dart pub global activate puro

# 2. Create an environment with the required Flutter version
puro create battery_checker stable

# 3. Clone and enter the project
git clone https://github.com/LotfiBoukhemerra/Battery-Health-Checker-App.git
cd Battery-Health-Checker-App

# 4. Use the Puro environment
puro use battery_checker

# 5. Install dependencies and run
flutter pub get
flutter run -d windows

πŸ§ͺ Running Tests

flutter test

πŸ“¦ Dependencies

Package Purpose
battery_plus Real-time battery level and charging state
window_manager Window size, minimize/close behavior
system_tray System tray icon and context menu
local_notifier Windows toast notifications
shared_preferences Persistent user settings
hugeicons Modern icon set
html Parsing powercfg battery report HTML
url_launcher Opening external links
http GitHub Releases API for update checking
intl Internationalization utilities

🀝 Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -m "Add my feature"
  4. Push to your fork: git push origin feature/my-feature
  5. Open a Pull Request

Guidelines

  • Follow the existing code style and architecture patterns
  • All colors must be defined in app_colors.dart
  • Add documentation comments to all public APIs
  • Run flutter analyze before submitting

πŸ’– Support the Project

If this app helps you, consider supporting its development:

Platform Link
πŸ’³ PayPal paypal.me/LotfiBoukhemerra
β˜• Ko-fi ko-fi.com/lotfibkmr

Every contribution β€” no matter how small β€” helps keep this project alive and growing. Thank you! πŸ™

πŸ“„ License

Battery Health Checker - Check your battery health Copyright (c) 2025 Lotfi Boukhemerra

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Author

Lotfi Boukhemerra


Made with ❀️ using Flutter

About

A Windows tool to check laptop battery health.

Topics

Resources

Code of conduct

Stars

90 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages