🧠 DroidDex Flutter A Flutter plugin for DroidDex β€” Blinkit’s Android performance profiling library. This plugin bridges your Flutter app with native Kotlin performance signals using MethodChannel and EventChannel.

πŸ”— Read the original blog: How Blinkit Cracked Android's Performance Puzzle with Droid Dex
πŸ§‘β€πŸ’» GitHub (Kotlin SDK): grofers/droid-dex

droid_dex_flutter

πŸš€ Features πŸ“Š Get performance levels for:

CPU

Battery

Network

Storage

Memory

βš–οΈ Weighted performance scoring via custom importance

πŸ” Real-time performance updates using event streams

⚑️ Simple API with enums and model wrappers

πŸ“¦ Installation Add this to your pubspec.yaml:

yaml

dependencies: droid_dex_flutter: ^<latest_version> Then run:

flutter pub get πŸ§ͺ Example Here's a minimal example:

final droidDex = DroidDexFlutter(); await droidDex.init();

final pairs = PerformanceClassWeightPair( performanceClass: PerformanceClass.cpu, weight: 2.0, ), PerformanceClassWeightPair( performanceClass: PerformanceClass.battery, weight: 1.5, ), ;

final staticLevel = await droidDex.getWeightedPerformanceLevel(pairs); print("Static Level: ${staticLevel.name}");

// Start real-time stream final stream = await droidDex.getWeightedPerformanceLevelLiveData(pairs); stream.listen((level) { print("Live Level: ${level.name}"); }); For a complete working demo, check the example app.

🎯 API Overview Initialization

await DroidDexFlutter().init(); Get Performance Level

Future

Future

Future<Stream

πŸ“š Resources πŸ”— DroidDex GitHub Repository

πŸ“° Medium Article (Blinkit Engineering)

🀝 Contributing Pull requests and issue reports are welcome! If you find a bug or have a feature request, feel free to open an issue on GitHub.