Cricket Intelligence Engine
A stateless, offline Cricket Intelligence Engine for Flutter apps that instantly calculates MVP, Net Run Rate (NRR), and phase dominance from raw cricket JSON scorecards without needing a backend API.
Features
- Zero Backend Required: Fully offline parsing and mathematical calculation entirely on the device CPU.
- Dynamic Scorecard Parsing: Safely ingests various cricket JSON structures, auto-calculating missing fields like Strike Rate or Economy.
- Instant Insights: Generates MVP projections, best performers (Batsman/Bowler), and Net Run Rate impact.
Usage
import 'package:cricket_intelligence_engine/cricket_intelligence_engine.dart';
void main() {
// 1. Your raw cricket JSON payload from an external source or database
Map<String, dynamic> rawJson = {
"match_id": "CRIC_2026_001",
"innings": [
// ... innings data
]
};
// 2. Pass it directly to the local Dart engine!
MatchPredictionOutput output = CricketEngine.analyzeRawJson(rawJson);
// 3. Display the insights
print("MVP: ${output.matchInsights.mostValuablePlayer.name}");
print("Impact Score: ${output.matchInsights.mostValuablePlayer.performanceScore}");
}