toMap method

Map<String, Object?> toMap()

Converts to a flat map — useful for JSON serialization to an AI provider.

Implementation

Map<String, Object?> toMap() => {
      'project': projectInfo,
      'environment': environmentInfo,
      'android': androidInfo,
      'analyzer': analyzerSummary,
      'top_critical': topCritical.map((e) => e.toMap()).toList(),
      'top_high': topHigh.map((e) => e.toMap()).toList(),
      'top_medium': topMedium.map((e) => e.toMap()).toList(),
      'root_causes': rootCauses.map((e) => e.toMap()).toList(),
    };