flutter_perf_monitor 0.0.2 copy "flutter_perf_monitor: ^0.0.2" to clipboard
flutter_perf_monitor: ^0.0.2 copied to clipboard

Real-time performance monitoring with FPS tracking and memory usage for Flutter applications

Flutter Performance Monitor #

Pub Version License Flutter Dart

A comprehensive performance monitoring package for Flutter applications that provides real-time FPS tracking, memory usage monitoring, and CPU usage statistics across all platforms.

Features #

  • 🎯 Real-time FPS tracking - Monitor frame rates in real-time
  • πŸ’Ύ Real memory monitoring - Track actual memory consumption using platform APIs
  • πŸ–₯️ Real CPU monitoring - Monitor actual CPU usage with native implementations
  • πŸ“Š Performance metrics - Comprehensive performance analytics
  • πŸ”„ Live updates - Real-time performance data updates
  • πŸ“± Universal platform support - Works on iOS, Android, Web, Windows, macOS, and Linux
  • ⚑ WASM compatible - Future-proof for Flutter Web improvements
  • πŸ† Perfect quality score - 160/160 Pana score for pub.flutter-io.cn
  • ⚑ Lightweight - Minimal performance impact on your app

Getting Started #

Installation #

Add this to your package's pubspec.yaml file:

dependencies:
  flutter_perf_monitor: ^0.0.2

Usage #

import 'package:flutter_perf_monitor/flutter_perf_monitor.dart';

void main() async {
  // Initialize the performance monitor
  await FlutterPerfMonitor.initialize();
  
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Stack(
          children: [
            // Your app content
            YourAppContent(),
            
            // Performance monitor widget overlay
            PerfMonitorWidget(
              alignment: Alignment.topRight,
              showFPS: true,
              showMemory: true,
              showCPU: true,
            ),
          ],
        ),
      ),
    );
  }
}

API Reference #

FlutterPerfMonitor #

The main class for performance monitoring.

Methods

  • initialize() - Initialize the performance monitor
  • startMonitoring() - Start performance monitoring
  • stopMonitoring() - Stop performance monitoring
  • getFPS() - Get current FPS value
  • getMemoryUsage() - Get current memory usage
  • getCPUUsage() - Get current CPU usage
  • getTotalMemory() - Get total available memory
  • getAvailableMemory() - Get available memory

PerfMonitorWidget #

A widget that displays performance metrics.

Platform Support #

This package provides universal platform support with native implementations:

  • βœ… iOS - Native mach APIs for real memory and CPU monitoring
  • βœ… Android - ActivityManager integration for system metrics
  • βœ… Web - Browser APIs with intelligent fallbacks
  • βœ… Windows - PDH and Process APIs for system monitoring
  • βœ… macOS - Native mach APIs for performance metrics
  • βœ… Linux - /proc filesystem integration
  • βœ… WASM - Compatible with Flutter Web WASM runtime

Quality Score #

This package has achieved a perfect 160/160 Pana score on pub.flutter-io.cn, ensuring:

  • βœ… Zero linting issues
  • βœ… Perfect code formatting
  • βœ… Comprehensive documentation
  • βœ… Universal platform support
  • βœ… Modern Flutter/Dart compatibility

Example #

See the example directory for a complete working example.

Contributing #

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License #

This project is licensed under the MIT License - see the LICENSE file for details.

Support #

If you encounter any problems or have suggestions, please file an issue at the GitHub repository.

Changelog #

See CHANGELOG.md for a list of changes and version history.

2
likes
160
points
196
downloads

Publisher

verified publisherbechattaoui.dev

Weekly Downloads

Real-time performance monitoring with FPS tracking and memory usage for Flutter applications

Repository (GitHub)
View/report issues
Contributing

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter, flutter_test, flutter_web_plugins

More

Packages that depend on flutter_perf_monitor