zeba_academy_performance

๐Ÿš€ A lightweight Flutter performance monitoring toolkit to help developers analyze and improve app performance during development.

zeba_academy_performance provides tools for monitoring FPS, widget rebuilds, API latency, memory usage, app startup time, and a live performance overlay โ€” all in one simple package.


โœจ Features

  • ๐Ÿ“Š FPS Monitoring โ€“ Track frames per second to detect UI performance issues
  • ๐Ÿ” Widget Rebuild Tracker โ€“ Identify unnecessary widget rebuilds
  • ๐Ÿง  Memory Usage Tracker โ€“ Monitor memory behavior during runtime
  • ๐ŸŒ API Latency Tracker โ€“ Measure network request performance
  • โšก App Startup Time Analyzer โ€“ Analyze application startup duration
  • ๐Ÿ–ฅ Performance Overlay โ€“ On-screen overlay displaying performance metrics

๐Ÿ“ฆ Installation

Add this package to your pubspec.yaml.

dependencies:
  zeba_academy_performance: ^1.0.0

Then run:

flutter pub get

๐Ÿš€ Getting Started

Import the package:

import 'package:zeba_academy_performance/zeba_academy_performance.dart';

๐Ÿ“Š Performance Overlay

Wrap your app with the performance overlay widget.

import 'package:flutter/material.dart';
import 'package:zeba_academy_performance/zeba_academy_performance.dart';

void main() {
  runApp(
    PerformanceOverlayWidget(
      child: MyApp(),
    ),
  );
}

This will display a live performance panel showing FPS and rebuild information.


๐Ÿ” Widget Rebuild Tracker

Track how many times a widget rebuilds.

RebuildTracker(
  name: "HomePage",
  child: HomePage(),
)

Useful for identifying unnecessary rebuilds.


๐ŸŒ API Latency Tracker

Measure the time taken for API requests.

final result = await ApiLatencyTracker.track(
  Future.delayed(const Duration(milliseconds: 200), () => "API response"),
);

Example console output:

API Latency: 200 ms

โšก App Startup Time Analyzer

Measure how long your app takes to start.

void main() {
  WidgetsFlutterBinding.ensureInitialized();

  runApp(MyApp());

  StartupTimeAnalyzer.stop();
}

Example console output:

App Startup Time: 350 ms

๐Ÿง  Memory Usage Tracker

Log memory information for debugging.

await MemoryTracker.logMemoryUsage();

๐Ÿ“Š FPS Monitor

Start FPS monitoring.

final fpsMonitor = FPSMonitor();
fpsMonitor.start();

print(fpsMonitor.fps);

๐Ÿงช Testing

Run tests using:

flutter test

๐Ÿค Contributing

Contributions are welcome!

If you would like to improve this package:

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request

๐Ÿ“œ License

This project is licensed under the GNU General Public License v3.0.


About Me

โœจ Iโ€™m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at sufyanism.com or connect with me on Linkedin


Your all-in-one no-bloat hub!

๐Ÿš€ Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! ๐Ÿ’ปโœจ

Zeba Academy is a learning platform dedicated to coding, technology, and development.

โžก Visit our main site: https://zeba.academy โžก Explore hands-on courses and resources at: https://code.zeba.academy โžก Check out our YouTube for more tutorials: https://www.youtube.com/@zeba.academy โžก Follow us on Instagram: https://www.instagram.com/zeba.academy/


โญ If you find this package useful, consider giving it a star and sharing it with the community!

Thank you for visiting!