import 'package:flutter/material.dart'; import 'package:lucide_icons/lucide_icons.dart'; import '../../models/sake_item.dart'; import '../sake_radar_chart.dart'; class SakeDetailChart extends StatelessWidget { final SakeItem sake; const SakeDetailChart({super.key, required this.sake}); @override Widget build(BuildContext context) { if (sake.hiddenSpecs.tasteStats.isEmpty || sake.itemType == ItemType.set) { return const SizedBox.shrink(); } return Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: Column( children: [ Row( children: [ Icon(LucideIcons.barChart2, size: 16, color: Theme.of(context).colorScheme.onSurface), const SizedBox(width: 8), Text( 'Visual Tasting', style: Theme.of(context).textTheme.labelLarge?.copyWith( color: Theme.of(context).colorScheme.onSurface, fontWeight: FontWeight.bold, ), ), ], ), const SizedBox(height: 16), SizedBox( height: 200, child: SakeRadarChart( tasteStats: { 'aroma': sake.hiddenSpecs.sakeTasteStats.aroma.round(), 'sweetness': sake.hiddenSpecs.sakeTasteStats.sweetness.round(), 'acidity': sake.hiddenSpecs.sakeTasteStats.acidity.round(), 'bitterness': sake.hiddenSpecs.sakeTasteStats.bitterness.round(), 'body': sake.hiddenSpecs.sakeTasteStats.body.round(), }, primaryColor: Theme.of(context).primaryColor, ), ), ], ), ); } }