import 'package:flutter/material.dart'; import '../data/models.dart'; import '../theme/lawheatmap_tokens.dart'; import 'lawheatmap_card.dart'; import 'source_chip.dart'; /// Sidebar listing the citable sources behind an evaluation. /// Surfaces the methodological audit story: every figure has a /// source and an evidence tier. class EvidenceSidebar extends StatelessWidget { const EvidenceSidebar({super.key, required this.evaluation}); final Evaluation evaluation; @override Widget build(BuildContext context) { final t = Theme.of(context).textTheme; return LawHeatmapCard( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text('Quellen', style: t.headlineSmall), const SizedBox(height: LawHeatmapSpace.sm), Text( 'Jede Zahl trägt die Tier-Stufe ihres schwächsten ' 'Bestandteils (Regel der niedrigsten Stufe, §6.7).', style: t.labelSmall?.copyWith(color: LawHeatmapColors.mute), ), const SizedBox(height: LawHeatmapSpace.lg), for (final s in evaluation.sources) SourceChip(source: s), const Divider(height: LawHeatmapSpace.xl), Text('Audit-Event', style: t.labelLarge), const SizedBox(height: 4), SelectableText( evaluation.auditEventId, style: t.labelSmall?.copyWith( fontFamily: LawHeatmapTypography.mono, color: LawHeatmapColors.mute, ), ), const SizedBox(height: LawHeatmapSpace.sm), Text( 'Quell-SHA-256:', style: t.labelSmall?.copyWith(color: LawHeatmapColors.mute), ), SelectableText( evaluation.norm.sourceSha256, style: t.labelSmall?.copyWith( fontFamily: LawHeatmapTypography.mono, color: LawHeatmapColors.mute, fontSize: 10, ), ), ], ), ); } }